home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 025a / vpi1330b.zip / PART2.MAN < prev    next >
Text File  |  1991-12-29  |  205KB  |  6,608 lines

  1.      VP-Info Level 1 Reference Manual           Page 109          SECTION 3
  2.  
  3.  
  4.  
  5.                                       STR(
  6.  
  7.      Converts a number to a string.
  8.  
  9.      ╔════════════════════════════════════════════════════════════════════╗
  10.      ║ STR(<num exp>,<width num exp>[,<decimals num exp>])                ║
  11.      ║                                                                    ║
  12.      ║ <num exp>         the number to be converted                       ║
  13.      ║ <width num exp>   the width of the string                          ║
  14.      ╟────────────────────────────────────────────────────────────────────╢
  15.      ║ Option:                                                            ║
  16.      ║                                                                    ║
  17.      ║ <decimals num exp> the number of decimals                          ║
  18.      ╟─────────────────┐                                                  ║
  19.      ║ Type: character │                                                  ║
  20.      ╚═════════════════╧══════════════════════════════════════════════════╝
  21.  
  22.           This function gets a number by evaluating the <num exp>, and
  23.      converts it into a string of given width.  Optionally, the number of
  24.      decimals can be specified (the default is 0).  See also PIC(.
  25.  
  26.           Examples:
  27.  
  28.      1>x=123.456
  29.      1>? STR(x,8)
  30.           123
  31.      1>? LEN(STR(x,8))
  32.           8.00
  33.      1>? STR(x,10)
  34.             123
  35.      1>? STR(x,10,1)
  36.           123.1
  37.  
  38.           When combined with the VAL( function, STR( is a convenient way of
  39.      rounding decimal numbers with a given precision.  For example:
  40.  
  41.      1>:PICTURE='9999.99999'
  42.      1>a=29.95748
  43.      1>? a
  44.        29.95748
  45.      1>? VAL(STR(a+.005,10,2))
  46.        29.96000
  47.      1>? VAL(STR(a+.00005,10,4))
  48.        29.95750
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.      STR(                       VPI1  VPI  VPIN                        STR(
  58.      VP-Info Level 1 Reference Manual           Page 110          SECTION 3
  59.  
  60.  
  61.  
  62.                                     SUBSTR(
  63.  
  64.      Gets a substring of a string.
  65.  
  66.      ╔════════════════════════════════════════════════════════════════════╗
  67.      ║ SUBSTR(<str exp>, <start num exp>, <width num exp>)                ║
  68.      ║                                                                    ║
  69.      ║ <str exp>         the string from which the new string is formed   ║
  70.      ║ <start num exp>   the position from which the new string is        ║
  71.      ║                     taken                                          ║
  72.      ║ <width num exp>   the number of characters to place in the         ║
  73.      ║                     new string                                     ║
  74.      ╟─────────────────┐                                                  ║
  75.      ║ Type: character │                                                  ║
  76.      ╚═════════════════╧══════════════════════════════════════════════════╝
  77.  
  78.           This function, a synonym for the $( function, takes the string in
  79.      <str exp> from position <start num exp> (fractions are thrown away);
  80.      the number of characters taken is <width num exp>.  (In both numeric
  81.      expressions, the fractions are disregarded).
  82.  
  83.           Examples:
  84.  
  85.      1>name='David Barberr'
  86.      1>? SUBSTR(name, 7,3)
  87.      Bar
  88.      1>? SUBSTR(name, 7,12)
  89.      Barberr
  90.      1>? LEN(SUBSTR(name,7,12))
  91.            7.00
  92.  
  93.           Note that SUBSTR(name,7,12) is of width 7, not 12; there are only
  94.      7 letters left in name from position 7.
  95.  
  96.      1>s=3
  97.      1>t=1
  98.      1>? SUBSTR(name+name,(s+t)/2,1.9)
  99.      a
  100.  
  101.           Note that 1.9 was taken as 1.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.      SUBSTR(                    VPI1  VPI  VPIN                     SUBSTR(
  115.      VP-Info Level 1 Reference Manual           Page 111          SECTION 3
  116.  
  117.  
  118.  
  119.                                      TEST(
  120.  
  121.      Tests a string whether it is a valid expression.
  122.  
  123.      ╔════════════════════════════════════════════════════════════════════╗
  124.      ║ TEST(<str exp>)                                                    ║
  125.      ║                                                                    ║
  126.      ║ <str exp>            the string to be tested                       ║
  127.      ╟───────────────┐                                                    ║
  128.      ║ Type: logical │                                                    ║
  129.      ╚═══════════════╧════════════════════════════════════════════════════╝
  130.  
  131.           This function tests the string in <str exp> as to whether it is a
  132.      valid expression; in particular, all variables must be defined and
  133.      must be of the proper type.  It returns T if it is, F otherwise.  If
  134.      the test is successful, TYPE( can be used to find the type of the
  135.      expression.
  136.  
  137.           In a VP-Info Level 1 program, use TEST( to find out whether a
  138.      selection criteria typed in by the user is correct.  Or use it to
  139.      ensure that a variable exists in a subroutine that may be called from
  140.      several programs.
  141.  
  142.           Examples:
  143.  
  144.      1>? TEST('check=0')
  145.      F                                   false because check is not defined
  146.      1>check=0
  147.      1>? TEST('check=0')
  148.      T
  149.      1>? TEST('check=0.or.check=1')
  150.      T
  151.      1>? TEST('check="A".or.check=1')
  152.      F                                   false because "A" is of character
  153.                                          type
  154.      1>? TEST('num')
  155.      F
  156.      1>num=5
  157.      1>? TEST('num')
  158.      T
  159.      1>? TEST('num+')                    false because the second operand
  160.                                          is missing
  161.      F
  162.  
  163.      IF .NOT. TEST('check')
  164.         check=0
  165.      ENDIF
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.      TEST(                      VPI1  VPI  VPIN                       TEST(
  173.      VP-Info Level 1 Reference Manual           Page 112          SECTION 3
  174.  
  175.  
  176.  
  177.                                      TIME(
  178.  
  179.      Gets the system time.
  180.  
  181.      ╔════════════════════════════════════════════════════════════════════╗
  182.      ║ TIME([<type>])                                                     ║
  183.      ╟────────────────────────────────────────────────────────────────────╢
  184.      ║ Option:                                                            ║
  185.      ║                                                                    ║
  186.      ║ <type>      one of three types of information requested, as listed ║
  187.      ║               below                                                ║
  188.      ╟─────────────────┐                                                  ║
  189.      ║ Type: character │                                                  ║
  190.      ╚═════════════════╧══════════════════════════════════════════════════╝
  191.  
  192.           This function returns a string containing the current system
  193.      time, and changes the format of the system variable :TIME to this
  194.      format. (See the system variable :TIME in Section 2.  Recall that
  195.      :TIME is initialized when VP-Info Level 1 starts up, but can be
  196.      reinitialized with a :TIME= command.)
  197.  
  198.           The <type> can be given in either of two forms, a name or number
  199.      (numeric expression) as follows:
  200.  
  201.           Type           Explanation                        Example
  202.  
  203.           1 or HMS       Hours,minutes,seconds,hundredths   17:26:36.07
  204.           2 or AMPM      Hours,minutes with AM/PM            5:36 pm
  205.           3 or Seconds   Seconds since midnight             62804.80
  206.  
  207.           Shortcut: When specifying type by name, only the first character
  208.           is required.
  209.  
  210.           The default parameter is 1, the time in the 24-hour format
  211.      hh:mm:ss.hh.
  212.  
  213.           Examples:
  214.  
  215.      1>? :TIME
  216.      15:45:59
  217.      1>? TIME(2)
  218.       3:46 pm
  219.      1>:TIME
  220.       3:46 pm
  221.  
  222.      start=VAL(TIME(seconds))
  223.      <program lines>
  224.      finish=VAL(TIME(seconds))
  225.      ? 'Program execution took',start-finish,'seconds.'
  226.  
  227.  
  228.  
  229.      TIME(                      VPI1  VPI  VPIN                       TIME(
  230.      VP-Info Level 1 Reference Manual           Page 113          SECTION 3
  231.  
  232.  
  233.  
  234.      This displays how long the running of <program lines> took, in
  235.      seconds.
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.      TIME(                      VPI1  VPI  VPIN                       TIME(
  287.      VP-Info Level 1 Reference Manual           Page 114          SECTION 3
  288.  
  289.  
  290.  
  291.                                      TRIM(
  292.  
  293.      Trims blanks from the right-hand side of a string.
  294.  
  295.      ╔════════════════════════════════════════════════════════════════════╗
  296.      ║ TRIM(<str exp>)                                                    ║
  297.      ║                                                                    ║
  298.      ║ <str exp>        the string to be trimmed                          ║
  299.      ╟─────────────────┐                                                  ║
  300.      ║ Type: character │                                                  ║
  301.      ╚═════════════════╧══════════════════════════════════════════════════╝
  302.  
  303.           VP-Info Level 1 stores strings in fields padded on the right with
  304.      blanks.  In actual use, these blanks may get in the way.  TRIM( gets
  305.      rid of the blanks on the right of a string.  TRIM( can be used in the
  306.      key of an index.  See also LTRIM(.
  307.  
  308.           Examples:
  309.  
  310.      1>a='David     '
  311.      1>? a
  312.      David
  313.      1>? LEN(a)
  314.          10.00
  315.      1>? TRIM(a)+' is trimmed'
  316.      David is trimmed
  317.      1>? LEN(TRIM(a))
  318.           5.00
  319.      1>blank='     '
  320.      1>? LEN(TRIM(blank))
  321.           1.00
  322.  
  323.           Note: TRIM(blank) is a single blank.
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.      TRIM(                      VPI1  VPI  VPIN                       TRIM(
  344.      VP-Info Level 1 Reference Manual           Page 115          SECTION 3
  345.  
  346.  
  347.  
  348.                                      TYPE(
  349.  
  350.      Gets the type of an expression.
  351.  
  352.      ╔════════════════════════════════════════════════════════════════════╗
  353.      ║ TYPE(<exp>)                                                        ║
  354.      ║                                                                    ║
  355.      ║ <exp>            any expression                                    ║
  356.      ╟─────────────────┐                                                  ║
  357.      ║ Type: character │                                                  ║
  358.      ╚═════════════════╧══════════════════════════════════════════════════╝
  359.  
  360.           For an expression, <exp>, this function returns the type of the
  361.      expression as a one character string:
  362.  
  363.      C    for character
  364.      L    for logical
  365.      N    for numeric
  366.      U    Undefined      ;created by GLOBAL or VARIABLES command, but not
  367.                           yet given a value or type
  368.  
  369.           To test whether a string is a valid expression, use the TEST(
  370.      function.
  371.  
  372.           Examples:
  373.  
  374.      1>a='name'
  375.      1>? TYPE(a)
  376.      C
  377.      1>? TYPE(a+a)
  378.      C
  379.      1>n=12
  380.      1>? TYPE(a+n)
  381.      1. Invalid variable type found when executing an expression.
  382.      1>? TYPE(a<a)
  383.      L
  384.      1>? TYPE(a<a.OR.n<5)
  385.      L
  386.      1>TYPE(n+5/10)
  387.      N
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      TYPE(                      VPI1  VPI  VPIN                       TYPE(
  401.      VP-Info Level 1 Reference Manual           Page 116          SECTION 3
  402.  
  403.  
  404.  
  405.                                      UPPER(
  406.  
  407.      Converts a string to upper case.
  408.  
  409.      ╔════════════════════════════════════════════════════════════════════╗
  410.      ║ UPPER(<str exp>)                                                   ║
  411.      ║                                                                    ║
  412.      ║ <str exp>    the text to be converted to upper case                ║
  413.      ╟─────────────────┐                                                  ║
  414.      ║ Type: character │                                                  ║
  415.      ╚═════════════════╧══════════════════════════════════════════════════╝
  416.  
  417.           All lower-case letters in the <str exp> are converted into upper
  418.      case by the UPPER( function, which is a synonym for the !( function.
  419.      See also the LOWER( function.
  420.  
  421.           Examples:
  422.  
  423.      1>a='Aa12b'
  424.      1>? UPPER(a)
  425.      AA12B
  426.      1>? UPPER('David!')
  427.      DAVID!
  428.  
  429.           Note that only the lower-case letters are changed.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.      UPPER(                     VPI1  VPI  VPIN                      UPPER(
  458.      VP-Info Level 1 Reference Manual           Page 117          SECTION 3
  459.  
  460.  
  461.  
  462.                                       VAL(
  463.  
  464.      Converts a string to its numeric value.
  465.  
  466.      ╔════════════════════════════════════════════════════════════════════╗
  467.      ║ VAL(<str exp>)                                                     ║
  468.      ║                                                                    ║
  469.      ║ <str exp>      the string to be evaluated                          ║
  470.      ╟───────────────┐                                                    ║
  471.      ║ Type: numeric │                                                    ║
  472.      ╚═══════════════╧════════════════════════════════════════════════════╝
  473.  
  474.           This function takes the string <str exp> which is a number, and
  475.      returns it as a number.  If the whole string cannot be interpreted as
  476.      a number, it takes as much of the front part as it can.
  477.  
  478.           Examples:
  479.  
  480.      1>a='123.23'
  481.      1>? VAL(a)
  482.         123.23
  483.      1>? VAL(123.23)
  484.      1. Invalid variable type found when executing an expression.
  485.      1>? VAL('a12')
  486.           0.00
  487.      1>? VAL('12a')
  488.          12.00
  489.      1>? VAL(DATE(2))
  490.  
  491.      yields the current month as a number.
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.      VAL(                       VPI1  VPI  VPIN                        VAL(
  515.      VP-Info Level 1 Reference Manual           Page 118          SECTION 3
  516.  
  517.  
  518.  
  519.                                      WOPEN(
  520.  
  521.      Opens a DOS file for writing.
  522.  
  523.      ╔════════════════════════════════════════════════════════════════════╗
  524.      ║ WOPEN(<str exp>[,<filenum>])                                       ║
  525.      ║                                                                    ║
  526.      ║ <str exp>      the file name                                       ║
  527.      ╟────────────────────────────────────────────────────────────────────╢
  528.      ║ Option:                                                            ║
  529.      ║                                                                    ║
  530.      ║ <filenum>      the DOS file number (between 1 and 4)               ║
  531.      ╟───────────────┐                                                    ║
  532.      ║ Type: logical │                                                    ║
  533.      ╚═══════════════╧════════════════════════════════════════════════════╝
  534.  
  535.           This function opens the DOS file, and in particular, the
  536.      sequential file <str exp> (or output device, such as COM1:) for
  537.      writing; if the file does not exist, it will be created.  If filenum
  538.      is not given, filenum=1 is assumed.  If no file extension is given,
  539.      the extension TXT is used.  It returns T if successful, F otherwise.
  540.  
  541.           See the functions ROPEN(, CLOSE(, GET(, PUT(, SEEK(, SSEEK(,
  542.      WRITE(, READ(, IN(, OUT(.
  543.  
  544.           Example:
  545.  
  546.      1>ok=WOPEN('a:label.prg')
  547.      1>? ok
  548.      T
  549.  
  550.           In a VP-Info Level 1 program, WOPEN( normally appears in an IF
  551.      command:
  552.  
  553.           IF WOPEN('file',2)
  554.           2. Two programs to print a text file, TEST (in the second version
  555.      it is assumed that TEST has no more than 20 lines):
  556.  
  557.      SET WIDTH TO 80
  558.      SET PRINT ON
  559.      IF ROPEN('test')
  560.         DO WHILE READ(line)
  561.            ? line
  562.         ENDDO
  563.         ok=CLOSE()
  564.      ENDIF
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.      WOPEN(                     VPI1  VPI  VPIN                      WOPEN(
  572.      VP-Info Level 1 Reference Manual           Page 119          SECTION 3
  573.  
  574.  
  575.  
  576.                                      WRAP(
  577.  
  578.      Wraps text for output.
  579.      ╔════════════════════════════════════════════════════════════════════╗
  580.      ║ WRAP(<str var>, <num exp>)                                         ║
  581.      ║                                                                    ║
  582.      ║ <str exp>        the string to be wrapped                          ║
  583.      ║ <num exp>        the line width                                    ║
  584.      ╟─────────────────┐                                                  ║
  585.      ║ Type: character │                                                  ║
  586.      ╚═════════════════╧══════════════════════════════════════════════════╝
  587.  
  588.           This function returns one line of text with word wrapping from
  589.      the string in <str var>; <str var> now contains what is left of the
  590.      string.  In other words, the string returned will contain as many
  591.      words as will fit in a line (the line width is given by <num exp>).
  592.      If the whole contents of <str var> is one line, <str var> becomes the
  593.      blank string (of length 1)
  594.  
  595.           WRAP(, IN(, GET(, and READ( are the only functions that change
  596.      the contents of the memory variable used as an argument.
  597.  
  598.           Examples:
  599.  
  600.      1>text='This text line is going to be wrapped in a printed line of
  601.      width 30.'
  602.      1>? text
  603.      This text line is going to be wrapped in a printed line of width 30.
  604.      1>temp=text
  605.      1>WRAP(temp,30)
  606.      This text line is going to be
  607.      1>? temp
  608.      wrapped in a printed line of width 30.
  609.      1>WRAP(temp,30)
  610.      wrapped in a printed line of
  611.      1>? temp
  612.      width 30.
  613.      1>WRAP(temp,30)
  614.      width 30.
  615.      1>? temp
  616.      1>? LEN(temp)
  617.           1.00
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.      WRAP(                      VPI1  VPI  VPIN                       WRAP(
  629.      VP-Info Level 1 Reference Manual           Page 120          SECTION 3
  630.  
  631.  
  632.  
  633.                                      WRITE(
  634.  
  635.      Writes a new line into the sequential file.
  636.  
  637.      ╔════════════════════════════════════════════════════════════════════╗
  638.      ║ WRITE(<str var>[,<filenum>])                                       ║
  639.      ║                                                                    ║
  640.      ║ <str var>      the line to be written                              ║
  641.      ╟────────────────────────────────────────────────────────────────────╢
  642.      ║ Option:                                                            ║
  643.      ║                                                                    ║
  644.      ║ <filenum>      the DOS file number (between 1 and 4)               ║
  645.      ╟───────────────┐                                                    ║
  646.      ║ Type: logical │                                                    ║
  647.      ╚═══════════════╧════════════════════════════════════════════════════╝
  648.  
  649.           This function writes (appends) the contents of the string
  650.      variable <str var> to the end of a sequential file opened with the
  651.      WOPEN( function.
  652.  
  653.           If filenum is not given, filenum=1 is assumed.  WRITE( returns T
  654.      if successful, F otherwise.
  655.  
  656.           See the functions ROPEN(, WOPEN(, READ(, IN(, OUT(, GET(, PUT(,
  657.      and CLOSE(.
  658.  
  659.           Example:
  660.  
  661.      1>ok=WOPEN('customer.frm',2)
  662.      1>ok=WRITE('FIELDS - cust,orderno,amount',2)
  663.      1>ok=CLOSE(2)
  664.  
  665.      creates the CUSTOMER.FRM report form file:
  666.  
  667.      FIELDS - cust,orderno,amount
  668.  
  669.           Now the command REPORT CUSTOMER will run the report.  This
  670.      example illustrates how a program can be written that creates a report
  671.      form file.
  672.  
  673.           In a VP-Info Level 1 program, WRITE( normally appears in an IF
  674.      command:
  675.  
  676.      IF WRITE('file',2)
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.      WRITE(                     VPI1  VPI  VPIN                      WRITE(
  686.      VP-Info Level 1 Reference Manual           Page 121          SECTION 3
  687.  
  688.  
  689.  
  690.                                 3.5. Expressions
  691.  
  692.  
  693.           Expressions can be formed from constants (Section 3.1) and
  694.      variables (Section 2.3) using operations (Section 3.2), relations
  695.      (Section 3.3), and functions (Section 3.4).  There are three types of
  696.      expressions: numeric, string, and logical.
  697.  
  698.           Numeric expressions are built up from numeric constants, numeric
  699.      variables, and from functions that give results of numeric type; they
  700.      are formed with the operations: +, -, *, /, and the parentheses: (
  701.      and ).
  702.  
  703.           String expressions are formed from string constants, string
  704.      variables, and from functions that give results of character type;
  705.      they use the operation + and the parentheses: ( and ).
  706.  
  707.           Logical expressions (also called conditions) are formed from
  708.      logical constants, logical variables, functions that give results of
  709.      logical type, and the results of relations; they use the logical
  710.      operations: .AND., .OR., .NOT., and the parentheses: ( and ).
  711.  
  712.           Examples: (in these examples, str1, str2 are string variables,
  713.      num1, num2 are numeric variables, log1, log2 are logical variables):
  714.  
  715.           String expressions:
  716.  
  717.      str1
  718.      str1+str2
  719.      str1+TRIM(str2)
  720.      str1+STR(num1+num2,10,2)+'Bach'
  721.  
  722.           Numeric expressions:
  723.  
  724.      num1
  725.      num1+5
  726.      (num1+5)/5
  727.      num1+(num2*VAL(str1))
  728.      LEN(str1)+LEN(TRIM(str2))+2
  729.  
  730.           Conditions (logical expressions):
  731.  
  732.      num1 < num2
  733.      num1+num2+LEN(str1) <> 15 .AND. .NOT. EOF
  734.      (str1='Boston') .AND. (num1 <> LEN(str1)).AND.log1.AND.(.NOT.log2)
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.      Expressions                VPI1  VPI  VPIN                 Expressions
  743.      VP-Info Level 1 Reference Manual           Page 122          SECTION 3
  744.  
  745.  
  746.  
  747.                             3.6. Rules of Precedence
  748.  
  749.  
  750.           In an expression such as
  751.  
  752.      2+3*4
  753.  
  754.      VP-Info Level 1 has to decide whether to perform the + first (result:
  755.      20) or the * first (result: 23).  The Rules of Precedence decide such
  756.      questions.
  757.  
  758.           Functions have the highest precedence.
  759.  
  760.           Arithmetic operations have the second highest precedence; among
  761.      themselves:
  762.  
  763.      *, /
  764.  
  765.      then
  766.  
  767.      +, -
  768.  
  769.           Relations are next; among themselves they all have the same
  770.      precedence.
  771.  
  772.           Logical operations come last; among themselves:
  773.  
  774.      .NOT.
  775.  
  776.      then
  777.  
  778.      .AND., .OR.
  779.  
  780.           When two or more of the above have the same precedence, they are
  781.      performed from left to right.
  782.  
  783.           The parentheses: ( and ) have higher precedence than functions,
  784.      operations, or relations.  Thus you can set the precedence explicitly
  785.      using parentheses.
  786.  
  787.           This means that you do not have to get involved in familiarizing
  788.      yourself with the Rules of Precedence.  If you want + first, write
  789.  
  790.      (2+3)*4
  791.  
  792.      If you want * first, write:
  793.  
  794.      2+(3*4)
  795.  
  796.  
  797.  
  798.  
  799.      Expressions                VPI1  VPI  VPIN                 Expressions
  800.      VP-Info Level 1 Reference Manual           Page 123          SECTION 3
  801.  
  802.  
  803.           The parentheses tell VP-Info Level 1 how you want the operations
  804.      performed!  Since VP-Info Level 1 throws away the parentheses when the
  805.      expression is compiled, you gain readability by using parentheses and
  806.      loose nothing.
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.      Expressions                VPI1  VPI  VPIN                 Expressions
  857.      VP-Info Level 1 Reference Manual          Page 124          SECTION 4
  858.  
  859.  
  860.  
  861.  
  862.  
  863.                       SECTION 4. VP-Info Level 1 COMMANDS
  864.  
  865.  
  866.  
  867.           All Level 1 and VP-Info Professional commands are defined in this
  868.      section.  Wherever differences exist between the two versions, they
  869.      are noted.  All comments applicable to Level 1 also apply to VP-Info
  870.      Professional and VP-Info Professional II.  All references to VP-Info 
  871.      Professional apply equally to the corresponding version of VP-Info 
  872.      Professional II.
  873.  
  874.           First, the form of the commands and the symbols used in defining
  875.      them are discussed.  The sample files used are described in the
  876.      Appendix.
  877.  
  878.           Then all the commands are listed alphabetically.
  879.  
  880.  
  881.  
  882.                          4.1. The Form of the Commands
  883.  
  884.  
  885.           A VP-Info Level 1 command consists of a command verb, such as
  886.      LIST, REPLACE; this is mostly followed by clauses that describe in
  887.      more detail what is to be done; for instance, in
  888.  
  889.      LIST NEXT 10
  890.  
  891.      the clause: "NEXT 10" restricts the LIST to the next 10 records
  892.      beginning with the current record.  In
  893.  
  894.      REPLACE amount WITH price*qty
  895.      
  896.      the clause "amount WITH price*qty" means that the field AMOUNT is to
  897.      be replaced with the expression "price*qty".  The command
  898.  
  899.      LIST NEXT 10 FOR amount<1000
  900.  
  901.      has two clauses.
  902.  
  903.           The command verb is always the first one or two words; in the
  904.      command listing, the command verb is shown as the heading.  For
  905.      instance, APPEND FROM is a command verb; so is COPY (and also COPY
  906.      STRUCTURE).  In the command:
  907.  
  908.      name='DAVID'
  909.  
  910.  
  911.  
  912.  
  913.      Form of the Commands                              Form of the Commands
  914.      VP-Info Level 1 Reference Manual          Page 125          SECTION 4
  915.  
  916.  
  917.      = is the command verb; this is the only exception to the rule that the
  918.      first word of a command line is always the command verb.
  919.  
  920.           The clauses are put together from VP-Info Level 1 keywords, such
  921.      as WITH, FOR, NEXT, and from variables.  As a rule, in this manual,
  922.      keywords will be shown in capital letters; however, the user can type
  923.      them with upper- or lower-case letters.  All VP-Info Level 1 keywords
  924.      are listed in Appendix ???.
  925.  
  926.           The power of VP-Info Level 1 derives from the fact that each
  927.      command can be made more selective with these clauses.  Two of the
  928.      most powerful clauses are scope (such as NEXT <n> and WHILE <cond>)
  929.      and selection (FOR <cond>).
  930.  
  931.  
  932.  
  933.                                   4.2. Symbols
  934.  
  935.  
  936.           In Section 4.3, all commands will be described in detail.  The
  937.      following symbols are used to describe the form of a command:
  938.  
  939.  
  940.      [ ]     clauses in square brackets are optional.  Do not type the
  941.                    brackets!  (The only exception is the DIM command and
  942.                    matrix names that use [ and ].)
  943.  
  944.                    Example:
  945.  
  946.                    APPEND [OFF]
  947.  
  948.                    APPEND is a command and so is APPEND OFF.  There may be
  949.                    many optional clauses in a command.
  950.  
  951.      /        clauses connected with / indicate an option or a switch; you
  952.                    can choose the clause before or after the /, but not
  953.                    both (the switch can also be optional).
  954.  
  955.                    Examples:
  956.  
  957.                    SET EXACT ON/OFF
  958.  
  959.                    SET EXACT ON and SET EXACT OFF are valid commands.
  960.  
  961.                    APPEND FROM <file> [FOR <cond>] [SDF/SDF DELIMITED]
  962.  
  963.                    SDF and SDF DELIMITED are optional clauses; you can
  964.                    choose neither, or either one, but not both.
  965.  
  966.      < >      Pointed brackets indicate that the user has to type in some
  967.                    information, for instance, <file> indicates that a file
  968.  
  969.  
  970.      Symbols                                                        Symbols
  971.      VP-Info Level 1 Reference Manual          Page 126          SECTION 4
  972.  
  973.  
  974.                    name has to be typed in.  Never type the pointed
  975.                    brackets.  Here are the most common information
  976.                    requests:
  977.  
  978.      <cond>   condition (logical expression), see <exp>.
  979.  
  980.                    Examples:
  981.  
  982.                    name='David'
  983.                    !(name)='DAVID'
  984.                    num3 < (num1+5) * 2.71
  985.  
  986.      <const>  constant (see Section 3.1).
  987.  
  988.                    Examples:
  989.  
  990.                    Numeric constant: 3.5
  991.                    String constant: 'bread'
  992.                    Logical constant: T or F.
  993.  
  994.                    If the constant has to be one of these specified types,
  995.                    instead of <const>, you find <num const>, <str const>,
  996.                    <log const>.
  997.  
  998.      <exp>    expression (see Section 3.5).
  999.  
  1000.                    Examples:
  1001.  
  1002.                    Numeric expression: num1+3 (NUM1 is a numeric variable)
  1003.                    String expression: name+$(fname,1,5)  (NAME and FNAME
  1004.                        are string variables, $( is a string function)
  1005.                    Logical expression (or condition): (2 < num1) .OR. male
  1006.                        (NUM1 is a numeric variable, MALE is a logical
  1007.                        variable)
  1008.  
  1009.                    If the expression has to be one of these specified
  1010.                    types, instead of <exp>, you find <num exp>, <str exp>,
  1011.                    <cond>.  (Note that a logical expression is the same as
  1012.                    a condition, see Section 3.5.)
  1013.  
  1014.      <exp list> expression list; separate the expressions by commas.  An
  1015.                    expression is an expression list with one item on the
  1016.                    list, so an <exp> will do wherever <exp list> is
  1017.                    requested.
  1018.  
  1019.                    Examples:
  1020.  
  1021.                    name
  1022.                    name,fname,tel:no,price*qty
  1023.  
  1024.  
  1025.  
  1026.  
  1027.      Symbols                                                        Symbols
  1028.      VP-Info Level 1 Reference Manual          Page 127          SECTION 4
  1029.  
  1030.  
  1031.      <field>  field name.
  1032.  
  1033.      <field list> field list; a list of fields separated by commas.  A
  1034.                    field is a field list with one item on the list, so a
  1035.                    <field> will do wherever <field list> is requested.
  1036.  
  1037.                    Examples:
  1038.  
  1039.                    name
  1040.                    name,fname,tel_no
  1041.  
  1042.      <file>   file name.
  1043.  
  1044.                    Examples:
  1045.  
  1046.                    trans,data3
  1047.  
  1048.                    See Section 2 on VP-Info Level 1 files.  The general
  1049.                    rule is that the extension, if not typed, is supplied by
  1050.                    VP-Info Level 1.  For instance, if <file> asks for the
  1051.                    name of a data file, type TRANS, and VP-Info Level 1
  1052.                    supplies ".DBF".
  1053.  
  1054.      <file list> file list; separate the files by commas.
  1055.  
  1056.                    Examples:
  1057.  
  1058.                    trans
  1059.                    trans,cust3,telno
  1060.  
  1061.      <file number> file number, a number between 1 and 10 for VP-Info
  1062.                    Professional, between 1 and 6 for Level 1).  See the
  1063.                    SELECT command on how a file number is selected.
  1064.  
  1065.      <format> format string.  See the @ command for the definition of
  1066.                    format strings.
  1067.  
  1068.                    Examples:
  1069.  
  1070.                    '99,999.99'
  1071.                    'XXA!XXA'
  1072.  
  1073.      <line,col> line number and column number; both line and col are
  1074.                    numeric expressions.
  1075.  
  1076.                    Examples:
  1077.  
  1078.                    15,23
  1079.                    mrow+1,mcol+10
  1080.  
  1081.  
  1082.  
  1083.  
  1084.      Symbols                                                        Symbols
  1085.      VP-Info Level 1 Reference Manual          Page 128          SECTION 4
  1086.  
  1087.  
  1088.      <memvar> memory variable; see Section 2.3.
  1089.  
  1090.      <memvar list> a list of memory variables separated by commas.
  1091.  
  1092.                    Example:
  1093.  
  1094.                    name,fname,salary,tel:no
  1095.  
  1096.      <num const> numeric constant
  1097.  
  1098.                    Example:
  1099.  
  1100.                    5
  1101.  
  1102.      <num exp> numeric expression, see <exp>.
  1103.  
  1104.                    Examples:
  1105.  
  1106.                    (num1+5)/5
  1107.                    VAL('3.14')+INT(field2)
  1108.  
  1109.      <procedure> procedure name.  See the PROCEDURE and PERFORM commands.
  1110.  
  1111.      <program> program name.
  1112.  
  1113.                    Example:
  1114.  
  1115.                    invoice
  1116.  
  1117.      <program segment> a number of VP-Info Level 1 commands.
  1118.  
  1119.                    Example:
  1120.  
  1121.                    price=23
  1122.                    amount=price * qty
  1123.                    @ 20,2 SAY amount
  1124.  
  1125.      <scope>  the scope of the command.  There are four scopes:
  1126.  
  1127.               ALL             execute for all records
  1128.               NEXT n          execute for the next n records
  1129.               RECORD n        execute only for this record
  1130.               WHILE <cond>    execute while <cond> holds; should be
  1131.                                    used only if <cond> holds for the
  1132.                                    current record; this scope is very
  1133.                                    useful for large data files
  1134.  
  1135.                    The scope is always optional; however, if none is
  1136.                    specified, the command will use the default scope.  For
  1137.                    each command that can have a scope, the default scope is
  1138.                    given.
  1139.  
  1140.  
  1141.      Symbols                                                        Symbols
  1142.      VP-Info Level 1 Reference Manual          Page 129          SECTION 4
  1143.  
  1144.  
  1145.  
  1146.      <string> any type of string; a line of text.
  1147.  
  1148.                    Examples:
  1149.  
  1150.                    This is a string
  1151.                    12.89!
  1152.  
  1153.      '<string>' A string in quotation marks (' or ", but matching)
  1154.  
  1155.                    Examples:
  1156.  
  1157.                    'This is a string'
  1158.                    "This is a string"
  1159.                    '1234'
  1160.                    "Alice's Restaurant"
  1161.  
  1162.      <str const> string expression, see <const>.
  1163.  
  1164.                    Example:
  1165.  
  1166.                    'Number: '
  1167.  
  1168.      <str exp> string expression, see <exp>.
  1169.  
  1170.                    Examples:
  1171.  
  1172.                    'Number: '+'34.89'
  1173.                    TRIM(str1)+$(field3,3,2)
  1174.  
  1175.      <text>   any number of lines of text.
  1176.  
  1177.                    Example:
  1178.  
  1179.                    This is a sample text for the TEXT command.  Notice that
  1180.                    you do not have to press <ENTER> at the end of the line,
  1181.                    the words jump to the next line where necessary.  You
  1182.                    press <ENTER> only at the end of a paragraph.
  1183.                    This is a new paragraph.
  1184.  
  1185.      <var>    variable name; see Section 2.3 for variables (same as
  1186.                    <memvar> or <field>).
  1187.  
  1188.                    Examples:
  1189.  
  1190.                    name
  1191.                    num1
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.      Symbols                                                        Symbols
  1199.      VP-Info Level 1 Reference Manual          Page 130          SECTION 4
  1200.  
  1201.  
  1202.  
  1203.                                4.3. Command List
  1204.  
  1205.  
  1206.           This section gives a complete listing of all the commands.  For
  1207.      more examples of the use of these commands, the reader is referred to
  1208.      the original VP-Info Manual published by Paperback Software
  1209.      International and distributed by Sub Rosa Publishing Inc. (Note that
  1210.      the original VP-Info Manual describes the language as it was released
  1211.      in 1986; all commands and functions of that release are still
  1212.      supported, although many are substantially enhanced.  The descriptive
  1213.      material is generally accurate and applies equally to all versions of
  1214.      VP-Info Level 1 except that networking is supported only by VP-Info
  1215.      Professional Network Edition.)
  1216.  
  1217.           As explained in Section 2.2, all commands that refer to data
  1218.      files can be modified with a #n; for instance,
  1219.  
  1220.      LIST#3 NEXT 4 FOR cost < 500
  1221.  
  1222.      modifies the LIST command to use file 3.  To avoid cluttering up the
  1223.      description of the commands, this [#n] option is not given.
  1224.  
  1225.           Normally, the explanation of the command is in five parts.
  1226.      First, the command verb is displayed.  Second, a brief explanation of
  1227.      the command is given.  The third part is the syntax, that is, the form
  1228.      of the command, with an explanation of what each symbol stands for.
  1229.      This part is framed for easy recognition.  The next part is a detailed
  1230.      explanation of how the command works.  This is followed, as a rule, by
  1231.      examples.
  1232.  
  1233.           The HELP command brings to the screen the first three parts and
  1234.      some examples when you use the standard help file; when you use the
  1235.      long help file, the entire text given here is displayed on the screen.
  1236.  
  1237.           In the examples, the data files of Appendix ??? will be used
  1238.      without any reference.
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.      Command List                                              Command List
  1256.      VP-Info Level 1 Reference Manual          Page 131          SECTION 4
  1257.  
  1258.  
  1259.  
  1260.                                        *
  1261.  
  1262.      Place comments -- notes -- in programs.
  1263.  
  1264.      ╔════════════════════════════════════════════════════════════════════╗
  1265.      ║ * [<string>]                                                       ║
  1266.      ╟────────────────────────────────────────────────────────────────────╢
  1267.      ║ Option:                                                            ║
  1268.      ║                                                                    ║
  1269.      ║ <string>   any text line: the comment                              ║
  1270.      ╚════════════════════════════════════════════════════════════════════╝
  1271.  
  1272.           The command * (or NOTE) is used for placing comments in a
  1273.      program.  VP-Info Level 1 ignores any line that starts with * (or
  1274.      NOTE).  Since the compilation removes all the comment lines, the
  1275.      number of comments has no effect on the speed of the compiled program.
  1276.  
  1277.           Notes can also be added with semicolon(;) at the end of any
  1278.      VP-Info Level 1 command line.
  1279.  
  1280.            Example:
  1281.  
  1282.      In a program:
  1283.  
  1284.      ********************************************************************
  1285.      * This is the start of the payroll computation module
  1286.      * Programmer: David Simco
  1287.      * Date: 2/8/90
  1288.      ********************************************************************
  1289.      USE employee INDEX employee  ;opening EMPLOYEE ordered by name
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.      *                          VPI1  VPI  VPIN                           *
  1313.      VP-Info Level 1 Reference Manual          Page 132          SECTION 4
  1314.  
  1315.  
  1316.  
  1317.                                        =
  1318.  
  1319.      Assign value to a memory variable, or to a field when a record is
  1320.      referenced as a vector of fields.
  1321.  
  1322.      ╔════════════════════════════════════════════════════════════════════╗
  1323.      ║ <memvar>=<exp>                                                     ║
  1324.      ║ <file>[<num exp>]=<exp>                                            ║
  1325.      ╚════════════════════════════════════════════════════════════════════╝
  1326.  
  1327.           Assigning values to memory variables.  The first form of this
  1328.      command assigns a value to a memory variable; if the variable does not
  1329.      exist, it will be created.  This command is equivalent to the STORE
  1330.      command (see STORE).
  1331.  
  1332.           Treating a data file as a vector.  The second form assigns a
  1333.      value to a field of a data file.  In this form, [ and ] do not
  1334.      indicate an option, [ and ] have to be typed in.  For instance,
  1335.      EMPLOYEE[3] is the third field, ADDR, of the EMPLOYEE data file.  This
  1336.      is the only way to assign a value to a field with the = command.
  1337.      Normally, field values are assigned with the REPLACE command.
  1338.  
  1339.           Special care must be taken when using this second form when the
  1340.      data file is opened with a macros (see USE).  Opening a file with a
  1341.      macro allows a standard program to work with a wide variety of files,
  1342.      provided the compiler is told the data file structure.
  1343.  
  1344.           Suppose a data file is opened with the following commands:
  1345.  
  1346.      USE inven COMPILE
  1347.      ACCEPT 'Enter name of data file to use: ' to fil_nam
  1348.      USE &fil_nam
  1349.  
  1350.           In this case, the compiled program assumes INVEN.DBF is in use,
  1351.      even though some other file with the same structure is actually
  1352.      opened.  Therefore, if fil_nam='INVEN88', the proper way to reference
  1353.      the 3rd field of the open data file is inven[3], not inven88[3].
  1354.  
  1355.           Examples:
  1356.  
  1357.      1>cost=23.89
  1358.      1>qty=45
  1359.      1>? cost*qty
  1360.        1075.05
  1361.      1>employee[1]='Steiner'
  1362.      1>n=6
  1363.      1>order[n+1]='Short-sleeve golf shirts'
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.      =                          VPI1  VPI  VPIN                           =
  1370.      VP-Info Level 1 Reference Manual          Page 133          SECTION 4
  1371.  
  1372.  
  1373.           Comment: = is the only VP-Info Level 1 command verb that does not
  1374.      appear at the start of the command line. All of the following are
  1375.      identical in effect:
  1376.  
  1377.      1>employee[1]='Steiner'
  1378.      1>REPLACE employee[1] WITH 'Steiner'
  1379.      1>REPLACE name WITH 'Steiner'
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.      =                          VPI1  VPI  VPIN                           =
  1427.      VP-Info Level 1 Reference Manual          Page 134          SECTION 4
  1428.  
  1429.  
  1430.  
  1431.                                        ?
  1432.                                        »
  1433.                      Display expression or expression list.
  1434.  
  1435.      ╔════════════════════════════════════════════════════════════════════╗
  1436.      ║ ? [<exp list>]                                                     ║
  1437.      ║ ?? [<exp list>]                                                    ║
  1438.      ╟────────────────────────────────────────────────────────────────────╢
  1439.      ║ Option:                                                            ║
  1440.      ║                                                                    ║
  1441.      ║ <exp list>   the expression or expressions to be displayed         ║
  1442.      ╚════════════════════════════════════════════════════════════════════╝
  1443.  
  1444.           The ? command evaluates the expression or expressions in the list
  1445.      (remember the commas to separate the expressions in the list!) and
  1446.      displays the results on a new line.  In particular, this command is
  1447.      often used to display the contents of memory variables and fields.
  1448.  
  1449.           The displayed items are separated by blanks if SET RAW OFF (see
  1450.      the SET command; on is the default).  When SET RAW ON, they appear
  1451.      side by side.
  1452.  
  1453.           ? with no expression displays a blank line; it is used for
  1454.      spacing on the screen and printer.
  1455.  
  1456.           While the ? command moves the cursor to the beginning of the next
  1457.      line before the items are displayed, the ?? command displays the items
  1458.      at the current cursor position.  The ?? command is used in programs to
  1459.      build lines of text on the screen or on the printer from several
  1460.      pieces.
  1461.  
  1462.           For displaying matrices, see Section 2.5.
  1463.  
  1464.           Examples:
  1465.  
  1466.           1. Displaying fields:
  1467.  
  1468.      1>USE employee
  1469.      1>GO 5
  1470.      1>? fname
  1471.      Poyner
  1472.      1>? fname,tel:no
  1473.      Poyner          403-1193
  1474.  
  1475.           2. Using the ? command as a calculator:
  1476.  
  1477.      1>b=7
  1478.      1>? 25/5+b,b*2,b*b
  1479.          12.00     14.00     49.00
  1480.  
  1481.  
  1482.  
  1483.      ?/??                       VPI1  VPI  VPIN                        ?/??
  1484.      VP-Info Level 1 Reference Manual          Page 135          SECTION 4
  1485.  
  1486.  
  1487.  
  1488.           3. A composite print line in a program segment (CUSTN and DEBIT
  1489.      are fields in the selected file):
  1490.  
  1491.      amount=0
  1492.      mcust=custn
  1493.      ? 'The amount of the invoice is: '
  1494.      DO WHILE custn=mcust.AND..NOT.EOF
  1495.         amount=amount+debit
  1496.         SKIP
  1497.      ENDDO
  1498.      ?? amount
  1499.  
  1500.           Note how the third and eighth command lines make one print line.
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.      ?/??                       VPI1  VPI  VPIN                        ?/??
  1541.      VP-Info Level 1 Reference Manual          Page 136          SECTION 4
  1542.  
  1543.  
  1544.  
  1545.                                        @
  1546.  
  1547.      Display data and data input request at specific line and column
  1548.      position on screen or printer, or erase the screen line starting at
  1549.      the specified coordinates.
  1550.  
  1551.      ╔════════════════════════════════════════════════════════════════════╗
  1552.      ║ @ <line,col> [SAY <exp> [USING <format>]] [GET <var> [PICTURE      ║
  1553.      ║      <format>]]                                                    ║
  1554.      ║                                                                    ║
  1555.      ║ line   the line number for the display, a numeric expression;      ║
  1556.      ║           the fractional part (if any) will be discarded           ║
  1557.      ║ col    the column number for the display, numeric expression;      ║
  1558.      ║           the fractional part (if any) will be discarded           ║
  1559.      ╟────────────────────────────────────────────────────────────────────╢
  1560.      ║ Options:                                                           ║
  1561.      ║                                                                    ║
  1562.      ║ none    erase the screen line starting at the specified            ║
  1563.      ║            row and column position; when printing, move print head ║
  1564.      ║            to specified position                                   ║
  1565.      ║                                                                    ║
  1566.      ║ SAY <exp> [USING <format>]                                         ║
  1567.      ║                                                                    ║
  1568.      ║ SAY     displays the expression, <exp>; if there is a USING        ║
  1569.      ║            clause, <exp> is displayed using the format             ║
  1570.      ║            specification <format>                                  ║
  1571.      ║                                                                    ║
  1572.      ║ GET <var> [PICTURE <format>]                                       ║
  1573.      ║ GET     asks for an input into the variable <var>; the present     ║
  1574.      ║            contents of the <var> is displayed; if there is a       ║
  1575.      ║            PICTURE clause, <var> is displayed using <format>.      ║
  1576.      ║            The input request is activated by the READ command      ║
  1577.      ╚════════════════════════════════════════════════════════════════════╝
  1578.  
  1579.           The @ command is used in VP-Info Level 1 programs, first, to
  1580.      display formatted data at specific locations on the screen or printer,
  1581.      and second, to prompt the user to type in data (in conjunction with
  1582.      the READ command).  If the SET FORMAT option is TO PRINT (see the SET
  1583.      FORMAT command), then the (formatted) data is sent to the printer and
  1584.      there can be no GET clause; otherwise the SET FORMAT TO SCREEN is in
  1585.      effect, and the data is sent to, and can be obtained from, the screen.
  1586.  
  1587.           The keywords of the @ command: SAY, USING, GET, PICTURE cannot be
  1588.      in macros.
  1589.  
  1590.           This command is a crucial element in making input screens and
  1591.      reports in VP-Info Level 1, but also consider the TEXT command, with
  1592.      many features of the @ command, and is usually used in preference to @
  1593.      for full-screen input and output, and printed output.
  1594.  
  1595.  
  1596.  
  1597.      @                          VPI1  VPI  VPIN                           @
  1598.      VP-Info Level 1 Reference Manual          Page 137          SECTION 4
  1599.  
  1600.  
  1601.  
  1602.           For the IBM screen, the line numbers (see the ROW() function) go
  1603.      from 0 to 24, column numbers (see the COL() function) from 0 to 79.
  1604.      For the printer, the line number counter begins at 0 (line 1); it is
  1605.      reset to 0 by the EJECT command (see the commands: EJECT, SET EJECT,
  1606.      SET LENGTH TO).  If there are several @ commands for the printer, each
  1607.      @ command must display past the display of the previous @ command
  1608.      (that is, if the first @ command displays at line1, col1, and the next
  1609.      at line2, col2, then either line1<line2, or line1=line2 and
  1610.      col1<col2).  If the new print position is less than the current print
  1611.      position, the printer head is not moved by the @ command.
  1612.  
  1613.           If GET <var> is used, the variable, <var> must exist; it is not
  1614.      created by this command.  The present value of <var> is shown on the
  1615.      screen; the new value typed in by the user becomes the contents of
  1616.      <var>; if <var> is a field, the field in the selected file is changed
  1617.      (a REPLACE is performed).
  1618.  
  1619.           If no option is used in screen output, for instance @ 10,0, the
  1620.      line is cleared on the screen starting at the indicated column.  On
  1621.      the printer, the print head is moved to the new position.
  1622.  
  1623.           If there is no <format> clause, the variable is displayed as
  1624.      follows: fields are displayed with the width specified in the data
  1625.      file structure; string memory variables are displayed as stored;
  1626.      numeric variables are displayed as specified by the :PICTURE system
  1627.      variable (see Section 2.6).
  1628.  
  1629.           The GET clauses are activated by the READ command.  There can be
  1630.      no more than 64 GET clauses for a READ command.  The GET clauses with
  1631.      their pictures are stored in a Get Table, which remains in effect
  1632.      after a READ until another GET clause is encountered or a CLEAR GETS
  1633.      command is encountered. It may also be cleared when leaving the
  1634.      current program module, depending on the setting of the SET GET
  1635.      command (see the commands: READ, SET GET, CLEAR GETS, and ON FIELD).
  1636.  
  1637.           Format clause.  A format clause is a string composed of format
  1638.      characters and background characters.  The format characters format
  1639.      the output, serve as holding places for characters in output, and mask
  1640.      the input; the background characters are placed in the output to make
  1641.      it prettier and in the input to make the input easier.
  1642.  
  1643.           For instance, if the variable DATE is a string of blanks, the
  1644.      command
  1645.  
  1646.      @ 5,1 SAY 'Type date (mm/dd/yy) ' GET date PICTURE '99/99/99'
  1647.  
  1648.      will display in line 5, column 1:
  1649.  
  1650.      Type date (mm/dd/yy)   /  /
  1651.  
  1652.  
  1653.  
  1654.      @                          VPI1  VPI  VPIN                           @
  1655.      VP-Info Level 1 Reference Manual          Page 138          SECTION 4
  1656.  
  1657.  
  1658.  
  1659.           In this example, 9 is a format character; it accepts only digits
  1660.      (0 to 9).  The slash (/) is a background character; it is displayed to
  1661.      help the input; the cursor jumps over the displayed / when the input
  1662.      is typed.  The format characters do not become part of the resulting
  1663.      input.
  1664.  
  1665.           Formatting numbers.  Formatting numbers is very easy.  Specify
  1666.      the number of decimals, the placement of commas, and perhaps a
  1667.      floating dollar sign.  Here are some examples:
  1668.  
  1669.  
  1670.      Number         Format           Display       Comment
  1671.  
  1672.      1123.89        '9,999.99'       1,123.89
  1673.      1000.89        '99999'             1000       the decimals were
  1674.                                                      dropped
  1675.      100.89         '$9,999.99'      $ 100.89      the comma does not
  1676.                                                      appear; note the two
  1677.                                                      blanks after the $
  1678.      100.89         '$,$$$.99'       $100.89         the $ floats to the
  1679.                                                      number up to the last
  1680.                                                      $ in the format
  1681.      100.89         '99'             **            stars means number is
  1682.                                                      too large to display
  1683.      100.89         '999.999'        100.890
  1684.  
  1685.  
  1686.           This is how the format works both with the SAY and the GET clause
  1687.      in displaying numbers; extreme care, however, must be exercised in
  1688.      using format with GET when inputting values to a numeric field, since
  1689.      the field and the picture must have the same number of digits before
  1690.      the decimal point.
  1691.  
  1692.           The GET clause displays the number in the variable or field;
  1693.      after the READ command, VP-Info Level 1 waits for input.  The input is
  1694.      typed in on top of the displayed number, ignoring where the number is,
  1695.      the dollar sign, commas, and the decimal point.  Only digits, the
  1696.      minus sign, and the decimal point are accepted.  Once the input is
  1697.      complete (by filling the field or by pressing <ENTER>), the new number
  1698.      is reformatted by the format clause, and redisplayed.
  1699.  
  1700.           Remember that in VP-Info Level 1, all numbers in a field have a
  1701.      specified width and number of decimals; these are recorded in the data
  1702.      file.  It is important to understand that a GET command does not
  1703.      change the width or the number of decimals for a field.  The field and
  1704.      the picture must have the same number of digits before the decimal
  1705.      point.
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.      @                          VPI1  VPI  VPIN                           @
  1712.      VP-Info Level 1 Reference Manual          Page 139          SECTION 4
  1713.  
  1714.  
  1715.           The number zero is displayed as a zero (in the specified format)
  1716.      or as blanks depending on whether SET ZERO is ON or OFF (the default
  1717.      is ON).
  1718.  
  1719.           To sum up: for numbers, only 9, $, the comma (,), and the period
  1720.      (.) are the format characters.  Any other character is a background
  1721.      character, except the two characters that format negative numbers, see
  1722.      below.
  1723.  
  1724.           Numbers are displayed as specified by the :PICTURE system
  1725.      variable (see Section 2.6); this can be changed by the <format>.
  1726.  
  1727.           Formatting negative numbers.  In some applications, the negative
  1728.      number -241.56 should appear as 241.56- or as <241.56>.  To achieve
  1729.      that, simply add - or > to the end of the picture format string:
  1730.  
  1731.      Number               Format             Display
  1732.  
  1733.      -241.56              9999.99            -241.56
  1734.      -241.56              9999.99-           241.56-
  1735.      -241.56              9999.99>          <241.56>
  1736.      241.56               9999.99-           241.56
  1737.      241.56               9999.99>           241.56
  1738.  
  1739.           Formatting strings.  For displaying strings, use four format
  1740.      characters: 9, X (or x), A (or a), and !.  Every other character is a
  1741.      background character.
  1742.  
  1743.           The format characters are just place holders for display
  1744.      purposes; each one will be replaced by a character of the string to be
  1745.      displayed:
  1746.  
  1747.  
  1748.      String    Format           Display         Comment
  1749.  
  1750.      'abcd'    'xXxx'           abcd            x and X are the same
  1751.      'abcd'    '!Xxx'           Abcd            ! forces character to caps
  1752.      'abcd'    '9X9!'           abcD            9 also displays letters
  1753.      'abcd'    'xx'             ab              displays as much as it can
  1754.      'abcd'    'xxxxx'          abcd            if the format has too many
  1755.                                                      place-holding
  1756.                                                      characters, the string
  1757.                                                      is padded with blanks
  1758.                                                      on the right
  1759.  
  1760.  
  1761.           Background characters can be mixed with the format characters:
  1762.  
  1763.      String        Format            Display        Comment
  1764.  
  1765.  
  1766.  
  1767.  
  1768.      @                          VPI1  VPI  VPIN                           @
  1769.      VP-Info Level 1 Reference Manual          Page 140          SECTION 4
  1770.  
  1771.  
  1772.      'abcd'        'X-X-X-X'         a-b-c-d        - is a background
  1773.                                                       character
  1774.      'abcd'        '(xx)-x/x'        (ab)-c/d       - and / are background
  1775.                                                       characters
  1776.      '2048856543'  '(xxx) xxx-xxxx'  (204) 885-6543 (, ), and - are
  1777.                                                       background characters
  1778.  
  1779.      String:   'DavidBrand'
  1780.  
  1781.      Format:  "1st: xxxxx, L'st: xxxxx"
  1782.  
  1783.      Display:  1st: David, L'st: Brand
  1784.  
  1785.           Comment:  This is an artificial example to show the pitfalls in
  1786.      using background characters.  In the format "1st name" will not work
  1787.      instead of "1st", because a is not a background character; that is
  1788.      also why "L'st" replaced "Last".  Finally, note the use of " as the
  1789.      format delimiter, so ' can be used in "L'st".
  1790.  
  1791.           In GET format clauses, 9, X, A, and ! are also place holders to
  1792.      display the present contents of the variable.  However, when
  1793.      VP-Info Level 1 receives the input after the READ command, 9, X, A,
  1794.      and ! become place holders that take only certain characters:
  1795.  
  1796.  
  1797.      9 takes only digits (0 to 9), - (minus), blank, and . (period)
  1798.      A takes only letters (a to z and A to Z)
  1799.      X takes any character
  1800.      ! takes any character but converts lower-case letters (a to z) to
  1801.             upper case letters (A to Z)
  1802.  
  1803.  
  1804.           For instance, if the memory variable tel_no contains 10 blanks,
  1805.      then
  1806.  
  1807.      @ 10,10 GET tel_no PICTURE '(999) 999-9999'
  1808.  
  1809.      will display (   )    -    , the cursor is after (, and only digits
  1810.      (and -, blank, .) are accepted for input.
  1811.  
  1812.           The @ GET <var> command does not change the length of a string
  1813.      variable <var>.  If the variable is a field, the width is defined when
  1814.      the file was created; for a memory variable, the width is determined
  1815.      by the current value.
  1816.  
  1817.           Note that the format clause is also used by the PIC( function.
  1818.  
  1819.           Examples:
  1820.  
  1821.           1. Erase line 15 on the screen; or with SET PRINT ON, print a
  1822.      blank line 15.
  1823.  
  1824.  
  1825.      @                          VPI1  VPI  VPIN                           @
  1826.      VP-Info Level 1 Reference Manual          Page 141          SECTION 4
  1827.  
  1828.  
  1829.  
  1830.      1>@ 15,0
  1831.  
  1832.           This is the same as
  1833.  
  1834.      1>ERASE 15,15
  1835.  
  1836.           2. Display (print) on line 15, column 10:
  1837.  
  1838.      1>@ 15,10 SAY name
  1839.  
  1840.                David Simco
  1841.  
  1842.           3. Display on line 20:
  1843.  
  1844.      1>number=523.89
  1845.      1>@ 20,12 SAY number USING '999'
  1846.  
  1847.                  523
  1848.  
  1849.           4. Display on line 10, column 5:
  1850.  
  1851.      1>number=7756.90
  1852.      1>@ 10,5 SAY number USING '9,999.99'
  1853.  
  1854.           7,756.90
  1855.  
  1856.           5. Display on line 20:
  1857.  
  1858.      1>@ 20,0 SAY number USING '$$$,$$$.99'
  1859.  
  1860.        $7,756.90
  1861.  
  1862.           6. Display on line 15:
  1863.  
  1864.      1>@ 15,0 SAY name USING '!!!!!!!!!!'
  1865.  
  1866.      DAVID SIMC
  1867.  
  1868.           7. Display on line 2:
  1869.  
  1870.      1>@ 2,0 SAY name USING '!!!!!!!!!!!!!!!'
  1871.  
  1872.      DAVID SIMCO
  1873.  
  1874.           8. Display on line 5:
  1875.  
  1876.      1>@ 5,0 SAY name USING 'xxxxx-----xxxxx'
  1877.  
  1878.      David----- Simc
  1879.  
  1880.  
  1881.  
  1882.      @                          VPI1  VPI  VPIN                           @
  1883.      VP-Info Level 1 Reference Manual          Page 142          SECTION 4
  1884.  
  1885.  
  1886.  
  1887.           9. Display on line 10:
  1888.  
  1889.      1>telno='2025554321'
  1890.      1>@ 10,5 SAY telno USING '(xxx) xxx-xxxx'
  1891.  
  1892.           (202) 555-4321
  1893.  
  1894.           10. Display "Hello" on the second line from the current line:
  1895.  
  1896.      1>@ ROW()+2,0 SAY 'Hello'
  1897.  
  1898.           11. Using GET and a number (possible only in a program):
  1899.            a. Issue the GET command:
  1900.  
  1901.      number=4452.78
  1902.      @ 10,10 GET number PICTURE '99999.99'
  1903.  
  1904.  
  1905.      This displays in line 10:
  1906.  
  1907.                4452.78
  1908.  
  1909.           b. Now give a READ command:
  1910.  
  1911.  
  1912.      READ
  1913.  
  1914.           The cursor is now on the first character of the number.
  1915.  
  1916.           c. Type 7805.44, you see:
  1917.  
  1918.                7805.448
  1919.  
  1920.      (notice the final 8, which remained from the original value of NUMBER,
  1921.      is not part of the new value; as soon as a digit is typed in a numeric
  1922.      editing field, all digits to its right are marked to be cleared) the
  1923.      cursor is on the last character; press <ENTER>.  This gives the
  1924.      display:
  1925.  
  1926.                7,805.44
  1927.  
  1928.           Note that background characters may not be used in a picture for
  1929.      a numeric GET.  No error will be shown, but the resulting values may
  1930.      be not what you intend.
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.      @                          VPI1  VPI  VPIN                           @
  1940.      VP-Info Level 1 Reference Manual          Page 143          SECTION 4
  1941.  
  1942.  
  1943.  
  1944.                                      ACCEPT
  1945.  
  1946.      Input request for strings.
  1947.  
  1948.      ╔════════════════════════════════════════════════════════════════════╗
  1949.      ║ ACCEPT ['<string>'] TO <str var>                                   ║
  1950.      ╟────────────────────────────────────────────────────────────────────╢
  1951.      ║ Option:                                                            ║
  1952.      ║                                                                    ║
  1953.      ║ '<string>'  the prompt message                                     ║
  1954.      ╚════════════════════════════════════════════════════════════════════╝
  1955.  
  1956.           This command is used in VP-Info Level 1 programs to request
  1957.      character information to be placed into a memory variable.  The text
  1958.      in <string> will be displayed as a prompt message.  Note that <string>
  1959.      has to be delimited by ' or by ", and may not be either a macro or a
  1960.      string expression.  ACCEPT cannot be used to input data into a field
  1961.      or element of a matrix.
  1962.  
  1963.           If the <memvar> does not exist, it will be created.
  1964.  
  1965.           The optional character string is used as a prompt.  A character
  1966.      expression cannot be used, but a macro is permitted, provided the
  1967.      macro expression includes quotation marks.
  1968.  
  1969.           To input numeric or logical data, use the INPUT command.
  1970.  
  1971.           Example:
  1972.  
  1973.      In a program:
  1974.  
  1975.      ACCEPT 'Your name: ' TO name
  1976.  
  1977.      Your name: David Simco
  1978.  
  1979.           The following illustrates use of a variable instead of a string
  1980.      as the prompt:
  1981.  
  1982.      1>prompt='"This is a prompt: "'
  1983.      1>ACCEPT &prompt TO hello
  1984.      This is a prompt:  George
  1985.      1>LIST MEMORY
  1986.  
  1987.      Name          Type    Width    Contents
  1988.      PROMPT          C      20      "This is a prompt: "
  1989.      HELLO           C       6      George
  1990.      ** Total ** 2  variables... 26  bytes
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.      ACCEPT                     VPI1  VPI  VPIN                      ACCEPT
  1997.      VP-Info Level 1 Reference Manual          Page 144          SECTION 4
  1998.  
  1999.  
  2000.  
  2001.                                      APPEND
  2002.  
  2003.      Append record to data file.
  2004.  
  2005.      ╔════════════════════════════════════════════════════════════════════╗
  2006.      ║ APPEND [FIELDS <field list> / TEXT <textfile>] / OFF ]             ║
  2007.      ╟────────────────────────────────────────────────────────────────────╢
  2008.      ║ Option:                                                            ║
  2009.      ║                                                                    ║
  2010.      ║ FIELDS <field list>   the fields to be edited during APPEND        ║
  2011.      ║ TEXT <textfile>       erases the screen, displays the text         ║
  2012.      ║                         file, and then does APPEND OFF             ║
  2013.      ╟────────────────────────────────────────────────────────────────────╢
  2014.      ║ Option:                                                            ║
  2015.      ║                                                                    ║
  2016.      ║ OFF                   rather than generate an APPEND input screen, ║
  2017.      ║                         uses an exiting screen and its Get Table   ║
  2018.      ╚════════════════════════════════════════════════════════════════════╝
  2019.  
  2020.           The APPEND command without either the OFF or TEXT option allows
  2021.      the user to add records to the selected file.  Once the command is
  2022.      given, the screen shows the new record in full-screen editing mode.
  2023.      For instance, if the selected file has 201 records, the screen will
  2024.      show record 202 with all fields filled with blanks; once record 202 is
  2025.      filled in, a blank record 203 is shown.
  2026.  
  2027.           To exit from APPEND, use <End> (or Ctrl-W) once you have filled
  2028.      in the fields of the last record desired.  If all the fields of the
  2029.      last record are blank, it will not be appended. To switch from APPEND
  2030.      to EDIT mode, press <Pg Up>.
  2031.  
  2032.           Note that APPEND is actually a special mode of EDIT; the only
  2033.      difference is that EDIT begins by displaying the current record, while
  2034.      APPEND adds a new blank record to the data file and displays that. All
  2035.      the editing fields are the same as in EDIT.  See the EDIT command for
  2036.      the complete list of editing keys.
  2037.  
  2038.           APPEND updates all index files in use.
  2039.  
  2040.           Example:
  2041.  
  2042.      1>USE employee
  2043.      1>APPEND
  2044.  
  2045.           VP-Info Level 1 goes into screen editing mode and displays record
  2046.      7 with all fields blank (the box showing editing keys is displayed
  2047.      when SET MENU is ON):
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.      APPEND                     VPI1  VPI  VPIN                      APPEND
  2054.      VP-Info Level 1 Reference Manual          Page 145          SECTION 4
  2055.  
  2056.  
  2057.  
  2058. ──────────────────────────────────────────────────────────────────────────────
  2059. #1 EMPLOYEE.DBF                                    APPEND Record       7
  2060.                                                                      Page 1
  2061. ┌────────────────────────────────────────────────────────────────────────────┐
  2062. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U        PAGE:  prev ^K  next ^L │
  2063. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  2064. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  2065. └────────────────────────────────────────────────────────────────────────────┘
  2066.  
  2067.      NAME...........
  2068.      FNAME..........
  2069.      ADDR...........
  2070.      CITY...........
  2071.      STATE..........
  2072.      ZIP............
  2073.      TEL_NO.........
  2074.      MARRIED........
  2075.      SALARY.........
  2076.      YEAR_EMP.......
  2077.      DEPT...........
  2078.      ADD_1..........
  2079. ──────────────────────────────────────────────────────────────────────────────
  2080.  
  2081.           VP-Info Level 1 offers two options that allow users to format
  2082.      their APPEND and EDIT screens to their specific requirements.
  2083.  
  2084.           APPEND OFF suppresses the standard APPEND/EDIT screen and uses an
  2085.      existing screen and its associated Get Table to accept the input. It
  2086.      is available only in a program.
  2087.  
  2088.           Example in a program:
  2089.  
  2090.      1>USE employee
  2091.      1>CLS
  2092.      1>TEXT add_empl
  2093.      1>APPEND OFF
  2094.  
  2095.           APPEND TEXT can be used in both conversational mode and programs.
  2096.      The following combines all the steps in the above example:
  2097.  
  2098.           Example:
  2099.  
  2100.      1>USE employee
  2101.      1>APPEND TEXT add_empl
  2102.  
  2103.           The input screen can be constructed with either @ GET or TEXT
  2104.      command. See @ and TEXT commands.
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.      APPEND                     VPI1  VPI  VPIN                      APPEND
  2111.      VP-Info Level 1 Reference Manual          Page 146          SECTION 4
  2112.  
  2113.  
  2114.  
  2115.                                   APPEND BLANK
  2116.  
  2117.      Append a blank record to data file.
  2118.  
  2119.      ╔════════════════════════════════════════════════════════════════════╗
  2120.      ║ APPEND BLANK                                                       ║
  2121.      ╟────────────────────────────────────────────────────────────────────╢
  2122.      ║ Option:                                                            ║
  2123.      ║                                                                    ║
  2124.      ║ BLANK     append blank record, no full-screen editing              ║
  2125.      ╚════════════════════════════════════════════════════════════════════╝
  2126.  
  2127.           APPEND BLANK adds a blank record to the selected file, and sets
  2128.      the current record number to this record.  The new record is not
  2129.      shown.  The fields of such a record are usually filled by the user
  2130.      with the REPLACE, @ GET, or EDIT commands (or variants of these, see
  2131.      the commands READ, =, TEXT, BROWSE).
  2132.  
  2133.           APPEND BLANK updates all index files in use.
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.      APPEND BLANK               VPI1  VPI  VPIN                APPEND BLANK
  2168.      VP-Info Level 1 Reference Manual          Page 147          SECTION 4
  2169.  
  2170.  
  2171.  
  2172.                                   APPEND FROM
  2173.  
  2174.      Append data to the selected file from another file.
  2175.  
  2176.      ╔════════════════════════════════════════════════════════════════════╗
  2177.      ║ APPEND FROM <file> [FOR <cond>] [SDF/SDF DELIMITED [WITH <char>]]  ║
  2178.      ║                                                                    ║
  2179.      ║ <file>         the name of the source file                         ║
  2180.      ╟────────────────────────────────────────────────────────────────────╢
  2181.      ║ Options:                                                           ║
  2182.      ║                                                                    ║
  2183.      ║ FOR <cond>     select by condition (not with sequential source     ║
  2184.      ║                   files)                                           ║
  2185.      ║ SDF            sequential source file                              ║
  2186.      ║ SDF DELIMITED  sequential source file with delimited fields        ║
  2187.      ║ SDF DELIMITED WITH <char> sequential source file with fields       ║
  2188.      ║                  delimited with a specific character <char>        ║
  2189.      ╚════════════════════════════════════════════════════════════════════╝
  2190.  
  2191.           This command appends records from the source file <file> to the
  2192.      selected file.  Fields are copied from the source file to the selected
  2193.      file into fields with the same name.  Deleted records are not
  2194.      appended.
  2195.  
  2196.           If a field in the source file has no matching field in the
  2197.      selected file, then the field is ignored.  If a field in the selected
  2198.      file has no matching field in the source file, then the field is set
  2199.      to blank.
  2200.  
  2201.           For character fields, if the field width gets smaller, then the
  2202.      field is truncated on the right; if the field width gets larger, then
  2203.      the field is padded with blanks on the right.
  2204.  
  2205.           For number fields, if a number will not fit in the new field,
  2206.      digits are lost on the left side of the number.  Be careful when
  2207.      moving numbers with different field widths.  If the source field has
  2208.      more decimals than the target field, decimals on the right will be
  2209.      dropped. If the target field has too few positions to the left of the
  2210.      decimal point, the value will be lost and the field filled with a zero
  2211.      followed by asterisks.
  2212.  
  2213.           The FOR clause is used to append a subset of the file specified.
  2214.      The condition <cond> is made up of memory variables and the fields of
  2215.      the source file; permitted only when the source is a data file.
  2216.  
  2217.           If the structure of two data files is identical in all respects,
  2218.      the records are appended very quickly; otherwise the APPEND is done
  2219.      one field at a time.  If a field name occurs only in the source file,
  2220.      its values will not be copied into the target data file.  (To change
  2221.      the name of a field, use the RENAME FIELD command.)
  2222.  
  2223.  
  2224.      APPEND FROM                VPI1  VPI  VPIN                 APPEND FROM
  2225.      VP-Info Level 1 Reference Manual          Page 148          SECTION 4
  2226.  
  2227.  
  2228.  
  2229.           APPEND FROM updates all index files in use.
  2230.  
  2231.           With any of the SDF options, VP-Info Level 1 reads the sequential
  2232.      file, and each line is turned into a new record of the data file
  2233.      appended to the end.  Each line must end with a carriage return
  2234.      (character 13) or a carriage return-line feed pair (characters 13 and
  2235.      10).  The characters of the line are placed in the new record one
  2236.      after another from the left, see examples.  See also the related
  2237.      command: COPY TO ... SDF.
  2238.  
  2239.           APPEND FROM ... SDF assumes that fields are not trimmed or
  2240.      delimited.
  2241.  
  2242.           With the SDF DELIMITED option, the line of the sequential file is
  2243.      regarded as a number of trimmed fields, separated by commas.  Strings
  2244.      can, in addition, be delimited by quotation marks.  These fields are
  2245.      placed in the fields of the data file from the left.  The remaining
  2246.      fields of the data file (if any) are left blank; the remainder of the
  2247.      line (after all the fields are filled), if any, is ignored.
  2248.  
  2249.           With the SDF DELIMITED WITH <char> option, the line of the
  2250.      sequential file is regarded as a number of fields, separated by
  2251.      commas.  Strings are trimmed, and the specified character is used to
  2252.      surround strings and logical constants.  Otherwise, this option is
  2253.      identical to SDF DELIMITED.
  2254.  
  2255.           The functions to read and write sequential files give much better
  2256.      control over sequential files.  See Section 3.
  2257.  
  2258.           Important programming note: The APPEND FROM command automatically
  2259.      opens the FROM file in its internal work area; if the FROM file is
  2260.      already open in another work area, the compiler will assume it is
  2261.      closed when the APPEND FROM command is passed during execution, even
  2262.      if that command is in an IF, CASE or other structure module that is
  2263.      not executed!
  2264.  
  2265.           Therefore, if there is any reference to the FROM file later in
  2266.      the program, open the file in the proper work area again immediately
  2267.      after the APPEND FROM command.  If it is not actually needed after the
  2268.      APPEND FROM is executed (e.g., the program exits after the APPEND
  2269.      FROM), open it with the COMPILE keyword.  Example:
  2270.  
  2271.      USE#4 invoices COMPILE
  2272.  
  2273.           Examples:
  2274.  
  2275.           1. Appending from a file with the same structure:
  2276.  
  2277.      1>USE employee
  2278.  
  2279.  
  2280.  
  2281.      APPEND FROM                VPI1  VPI  VPIN                 APPEND FROM
  2282.      VP-Info Level 1 Reference Manual          Page 149          SECTION 4
  2283.  
  2284.  
  2285.      1>COPY STRUCTURE TO empl1
  2286.      1>USE empl1
  2287.      1>APPEND FROM employee FOR name < 'Q'
  2288.            3 APPEND(S)
  2289.      1>LIST name
  2290.            1  Marek
  2291.            2  Balzer
  2292.            3  Poyner
  2293.      1>ZAP
  2294.      1>APPEND FROM employee FOR tel_no < '5'
  2295.            1 APPEND(S)
  2296.  
  2297.           2. Appending from a file with a different structure.  Append from
  2298.      EMPLOYEE.DBF.
  2299.  
  2300.           The selected file is:
  2301.  
  2302.      Datafile name :      EMPL2.DBF
  2303.      Number of records:       0
  2304.      Database selected is  #1
  2305.      Field   Name       Type Width   Dec
  2306.        1     NAME         C     15
  2307.        2     NAME1        C     10
  2308.        3     ADDR         C      5
  2309.        4     CITY         C     25
  2310.        5     STATE        C      2
  2311.        6     ZIP          C      5
  2312.        7     TEL_NO       C      8
  2313.        8     MARRIED      L      1
  2314.        9     SALARY       N      2      0
  2315.       10     YEAR_EMP     N      6      2
  2316.       11     DEPT         C     15
  2317.      ** Record Length **        95
  2318.  
  2319.           EMPL2 has a field NAME1 that does not occur in EMPLOYEE; the
  2320.      field FNAME in EMPLOYEE does not occur in EMPL2.
  2321.  
  2322.           The ADDR field in EMPLOYEE has width 20, in EMPL2 it has width 5.
  2323.      The CITY field in EMPLOYEE has width 20, in EMPL2 it has width 25.
  2324.      The SALARY field in EMPLOYEE has width 9, in EMPL2 it has width 2.
  2325.      The YEAR_EMP field in EMPLOYEE has width 4, in EMPL2 it has width 6;
  2326.      but only 3 characters are available for the number to the left of the
  2327.      decimal point.
  2328.  
  2329.      1>USE empl2
  2330.      1>APPEND FROM employee
  2331.            6 APPEND(S)
  2332.      1>EDIT 1
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.      APPEND FROM                VPI1  VPI  VPIN                 APPEND FROM
  2339.      VP-Info Level 1 Reference Manual          Page 150          SECTION 4
  2340.  
  2341.  
  2342.  
  2343. ──────────────────────────────────────────────────────────────────────────────
  2344. #1 EMPL2.DBF                                         EDIT Record       1
  2345.                                                                      Page 1
  2346. ┌────────────────────────────────────────────────────────────────────────────┐
  2347. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U        PAGE:  prev ^K  next ^L │
  2348. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  2349. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  2350. └────────────────────────────────────────────────────────────────────────────┘
  2351.      NAME...........  Marek
  2352.      NAME1..........
  2353.      ADDR...........  231 R
  2354.      CITY...........  Broomsdale
  2355.      STATE..........  MD
  2356.      ZIP............  02110
  2357.      TEL_NO.........  566-7012
  2358.      MARRIED........  y
  2359.      SALARY.........  0*
  2360.      YEAR_EMP.......  0*****
  2361.      DEPT...........  Maintenance
  2362. ──────────────────────────────────────────────────────────────────────────────
  2363.  
  2364.  
  2365.           Note that ADDR was cut down to 5 characters; CITY was padded by 5
  2366.      blanks; SALARY and YEAR_EMP indicate that there was not enough room
  2367.      for the numbers.
  2368.  
  2369.           3. Appending with the SDF option.
  2370.  
  2371.           Use the EMPLOYEE file, and append from a sequential file:
  2372.      DATA.TXT.  Give the commands:
  2373.  
  2374.      1>USE employee
  2375.      1>APPEND FROM DATA SDF
  2376.  
  2377.      Let the first line of DATA.TXT be:
  2378.  
  2379.      Smith          Robert    412 River Street
  2380.  
  2381.      then the first three fields will be correctly placed.  Note that the
  2382.      APPEND with SDF does not check for data correctness (numbers into
  2383.      numeric fields), for field width, etc.  This option can be used if
  2384.      some other program already formatted the sequential file in absolute
  2385.      conformity with the structure of the data file.
  2386.  
  2387.           4. APPEND with the SDF DELIMITED option is easier to use.
  2388.  
  2389.           Continuing the previous example,
  2390.  
  2391.      Smith,Robert,412 River Street
  2392.  
  2393.  
  2394.  
  2395.      APPEND FROM                VPI1  VPI  VPIN                 APPEND FROM
  2396.      VP-Info Level 1 Reference Manual          Page 151          SECTION 4
  2397.  
  2398.  
  2399.  
  2400.      or
  2401.  
  2402.      'Smith','Robert','412 River Street'
  2403.  
  2404.      would do.  It is important to have the fields delimited with quotation
  2405.      marks if any field contains a comma.  Fields for which no data is
  2406.      supplied should be represented by commas as "place holders."  For
  2407.      instance,
  2408.  
  2409.      ,,'412 River Street'
  2410.  
  2411.           5. APPEND with the SDF DELIMITED WITH <char> option works the
  2412.      same way.
  2413.  
  2414.           Continuing the previous example, the command
  2415.  
  2416.      APPEND FROM source SDF DELIMITED WITH |
  2417.  
  2418.      working on the following line
  2419.  
  2420.      |Smith|,|Robert|,|412 River Street|
  2421.  
  2422.      would append the record correctly.  The use of a specified character
  2423.      other than single quote reduces or eliminates the concern about having
  2424.      commas, apostrophes and quotation marks in field contents.  Fields for
  2425.      which no data is supplied should be represented by the specified
  2426.      character as "place holders."  For instance,
  2427.  
  2428.      ||,||,412 River Street|
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.      APPEND FROM                VPI1  VPI  VPIN                 APPEND FROM
  2453.      VP-Info Level 1 Reference Manual          Page 152          SECTION 4
  2454.  
  2455.  
  2456.  
  2457.                                    APPEND TO
  2458.  
  2459.      Append current record to another file.
  2460.  
  2461.      ╔════════════════════════════════════════════════════════════════════╗
  2462.      ║ APPEND TO <num const>                                              ║
  2463.      ║                                                                    ║
  2464.      ║ <num const>     append record to file in select area <num const>   ║
  2465.      ╚════════════════════════════════════════════════════════════════════╝
  2466.  
  2467.           This command appends the current record from the selected file to
  2468.      the file numbered <num const>.  The same rules apply as in the APPEND
  2469.      FROM command.
  2470.  
  2471.           You can also append to the same file by giving its file number.
  2472.  
  2473.           Examples:
  2474.  
  2475.           1. Interactive use.  There is a Backorder File; you are looking
  2476.      through it with EDIT or BROWSE to find which orders should be filled.
  2477.      Store "^Q;APPEND TO 4;BROWSE;^X;" into a function key, and whenever an
  2478.      order to ship is found, you press the function key.  File 4 is the
  2479.      file of orders to be shipped.
  2480.  
  2481.           2. There is a Name-and-Address file, and a label printing program
  2482.      that prints a whole file, the Label file.  The Name-and-Address file
  2483.      is searched by the above method, and APPEND TO is used to put the
  2484.      addresses to be printed in the Label file.
  2485.  
  2486.           3. A program segment.  File 2 is a backorder file; each record
  2487.      contains 25 fields including Q1 to Q8, the quantities for the eight
  2488.      sizes.  This program segment asks how much of each size should be
  2489.      shipped; the end result is that the items to be shipped are appended
  2490.      to the end of File 2, while the original record is changed to reflect
  2491.      the shipped quantities.
  2492.  
  2493.      SELECT 2
  2494.      STORE # TO gback
  2495.      APPEND TO 5
  2496.      @ y,35 GET q1
  2497.      @ y,39 GET q2
  2498.      @ y,43 GET q3
  2499.      @ y,47 GET q4
  2500.      @ y,51 GET q5
  2501.      @ y,55 GET q6
  2502.      @ y,59 GET q7
  2503.      @ y,63 GET q8
  2504.      READ
  2505.      REPLACE quant WITH q1+q2+q3+q4+q5+q6+q7+q8
  2506.  
  2507.  
  2508.  
  2509.      APPEND TO                  VPI1  VPI  VPIN                   APPEND TO
  2510.      VP-Info Level 1 Reference Manual          Page 153          SECTION 4
  2511.  
  2512.  
  2513.      SELECT 5
  2514.      REPLACE q1 WITH q1-q1#2,q2 WITH q2-q2#2,q3 WITH q3-q3#2
  2515.      REPLACE q4 WITH q4-q4#2,q5 WITH q5-q5#2,q6 WITH q6-q6#2
  2516.      REPLACE q7 WITH q7-q7#2,q8 WITH q8-q8#2
  2517.      REPLACE quant WITH q1+q2+q3+q4+q5+q6+q7+q8
  2518.      REPLACE type WITH 'O'
  2519.      APPEND TO 2
  2520.      SELECT 2
  2521.      GOTO gback
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.      APPEND TO                  VPI1  VPI  VPIN                   APPEND TO
  2567.      VP-Info Level 1 Reference Manual          Page 154          SECTION 4
  2568.  
  2569.  
  2570.  
  2571.  
  2572.                                     AVERAGE
  2573.  
  2574.      Average numeric expressions for selected records.
  2575.  
  2576.      ╔════════════════════════════════════════════════════════════════════╗
  2577.      ║ AVERAGE <num exp list> [TO <memvar list>] [<scope>] [FOR <cond>]   ║
  2578.      ║                                                                    ║
  2579.      ║ <num exp list>    the numeric expressions to average               ║
  2580.      ╟────────────────────────────────────────────────────────────────────╢
  2581.      ║ Options:                                                           ║
  2582.      ║                                                                    ║
  2583.      ║ <memvar list>     store the results in these memory variables      ║
  2584.      ║ <scope>           select by scope (default scope: ALL)             ║
  2585.      ║ FOR <cond>        select by condition                              ║
  2586.      ╚════════════════════════════════════════════════════════════════════╝
  2587.  
  2588.           The command AVERAGE adds up numeric expressions for selected
  2589.      records of the selected data file and divides the result with the
  2590.      number of records summed.  Up to 10 expressions can be averaged with
  2591.      one command.  Optionally, the results can be stored in numeric memory
  2592.      variables; the expression list and the numeric memory variable list
  2593.      should have the same number of entries.  <memvar list> cannot contain
  2594.      numeric matrix variables.
  2595.  
  2596.           Records flagged as DELETED are not averaged.
  2597.  
  2598.           Memory variables in <memvar list> need not exist; if any variable
  2599.      in the <memvar list> does not exist, this command creates it.
  2600.  
  2601.           Example:
  2602.  
  2603.           The average earning of the employees (in the data file EMPLOYEE),
  2604.      and the average year employment began:
  2605.  
  2606.      1>USE employee
  2607.      1>AVERAGE salary, year_emp
  2608.            6 AVERAGE(S)
  2609.        32502.16    1980.50
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.      AVERAGE                    VPI1  VPI  VPIN                     AVERAGE
  2624.      VP-Info Level 1 Reference Manual          Page 155          SECTION 4
  2625.  
  2626.  
  2627.  
  2628.                                     BINLOAD
  2629.  
  2630.      Load a binary (assembly-language) program into memory.
  2631.  
  2632.      ╔════════════════════════════════════════════════════════════════════╗
  2633.      ║ BINLOAD <programname>                                              ║
  2634.      ║                                                                    ║
  2635.      ║ <programname>  a binary file to be executed under                  ║
  2636.      ║                   VP-Info Professional (not available under        ║
  2637.      ║                   Level 1); default extension BIN                  ║
  2638.      ╚════════════════════════════════════════════════════════════════════╝
  2639.  
  2640.           VP-Info Professional only: Assembly-language programs may be
  2641.      copied from disk into a special area of memory called BINSPACE, which
  2642.      must be set aside with the BINSPACE= command in your VPI.SET or
  2643.      VPIN.SET file.
  2644.  
  2645.           When no longer needed, the program can be removed from the
  2646.      BINSPACE with the BINUNLOAD command, allowing room for another binary
  2647.      program to take its place. A maximum of eight binary files, with
  2648.      default extension BIN, may be loaded into memory at one time.
  2649.  
  2650.           Once loaded into the BINSPACE, the program may be executed with
  2651.      the CALL command (see the CALL and BINUNLOAD commands).
  2652.  
  2653.           Examples:
  2654.  
  2655.      1>BINLOAD test
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.      BINLOAD                        VPI  VPIN                       BINLOAD
  2681.      VP-Info Level 1 Reference Manual          Page 156          SECTION 4
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.      BINLOAD                        VPI  VPIN                       BINLOAD
  2738.      VP-Info Level 1 Reference Manual          Page 157          SECTION 4
  2739.  
  2740.  
  2741.  
  2742.                                    BINSPACE=
  2743.  
  2744.      Reserve space in memory to BINLOAD binary files to be run with the
  2745.      CALL command.
  2746.  
  2747.      ╔════════════════════════════════════════════════════════════════════╗
  2748.      ║ BINSPACE= <blocks>                                                 ║
  2749.      ║                                                                    ║
  2750.      ║          VP-Info Professional only             VPI.SET file only   ║
  2751.      ║                                                                    ║
  2752.      ║ <blocks>    the number of 1K blocks of RAM to be reserved          ║
  2753.      ║               for loading BIN files with the BINLOAD command       ║
  2754.      ╚════════════════════════════════════════════════════════════════════╝
  2755.  
  2756.           VP-Info Professional only: Assembly-language programs may be
  2757.      copied from disk into a special area of memory called BINSPACE, which
  2758.      must be set aside with the BINSPACE= command in your VPI.SET or
  2759.      VPIN.SET file.
  2760.  
  2761.           The number of 1K blocks, to a maximum of 32, must be specified.
  2762.  
  2763.           The BINSPACE is allocated above VP-Info Level 1's 64K data space
  2764.      and high memory, and reduces the amount of DOS memory available to
  2765.      execute commands with the RUN command.
  2766.  
  2767.           Once loaded into the BINSPACE with BINLOAD, the program may be
  2768.      executed with the CALL command (see the CALL, BINLOAD, and BINUNLOAD
  2769.      commands).
  2770.  
  2771.           Examples:
  2772.  
  2773.      1>BINSPACE=16
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.      BINSPACE=                      VPI  VPIN                     BINSPACE=
  2795.      VP-Info Level 1 Reference Manual          Page 158          SECTION 4
  2796.  
  2797.  
  2798.  
  2799.                                    BINUNLOAD
  2800.  
  2801.      Remove a binary (assembly-language) program from memory.
  2802.  
  2803.      ╔════════════════════════════════════════════════════════════════════╗
  2804.      ║ BINUNLOAD <programname>                                            ║
  2805.      ║                                                                    ║
  2806.      ║ <programname>  a binary file to removed from memory by             ║
  2807.      ║                   VP-Info Professional (not available under        ║
  2808.      ║                   Level 1); default extension BIN                  ║
  2809.      ╚════════════════════════════════════════════════════════════════════╝
  2810.  
  2811.           VP-Info Professional only: Assembly-language programs, which are
  2812.      loaded into a special area of memory called BINSPACE by the BINLOAD
  2813.      command, may be removed from memory by the BINUNLOAD command when no
  2814.      longer needed.
  2815.  
  2816.           This allows room for another binary program to take its place. A
  2817.      maximum of eight binary files, with default extension BIN, may be
  2818.      loaded into memory at one time.
  2819.  
  2820.           Care should be taken not to create "holes in memory" by loading
  2821.      and unloading BIN files indiscriminately. For best performance, users
  2822.      are urged to load frequently called binary files first and not unload
  2823.      them; then transient or occasional binary programs can be loaded,
  2824.      called and immediately unloaded with the BINUNLOAD command.
  2825.  
  2826.           (See BINLOAD and CALL commands.)
  2827.  
  2828.           Examples:
  2829.  
  2830.      1>BINUNLOAD test
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.      BINUNLOAD                      VPI  VPIN                     BINUNLOAD
  2852.      VP-Info Level 1 Reference Manual          Page 159          SECTION 4
  2853.  
  2854.  
  2855.  
  2856.                                       BOX
  2857.  
  2858.      Draw a box on the screen.
  2859.  
  2860.      ╔════════════════════════════════════════════════════════════════════╗
  2861.      ║ BOX <line1>,<col1>,<line2>,<col2> [DOUBLE]                         ║
  2862.      ║                                                                    ║
  2863.      ║ <line1>,<col1>   the position of the upper-left corner of the box  ║
  2864.      ║ <line2>,<col2>   the position of the lower-right corner of the box ║
  2865.      ╟────────────────────────────────────────────────────────────────────╢
  2866.      ║ Option:                                                            ║
  2867.      ║                                                                    ║
  2868.      ║ DOUBLE   use double line graphics, the default is single-line      ║
  2869.      ╚════════════════════════════════════════════════════════════════════╝
  2870.  
  2871.           The command BOX draws a box on the screen using the character
  2872.      graphics of the IBM monochrome screen.  If line1=line2, a horizontal
  2873.      line is drawn.  If col1=col2, a vertical line is drawn.
  2874.  
  2875.           line1, line2, col1, col2 can all be numbers or numeric
  2876.      expressions; any fractional part will be disregarded
  2877.  
  2878.           This command is useful for making menus pretty, and for
  2879.      partitioning the screen into different viewing areas.
  2880.  
  2881.           Note that commas are required between the numeric expressions
  2882.      used for the corner specifications, but a comma is NOT permitted
  2883.      before the DOUBLE keyword.
  2884.  
  2885.           The WINDOW command can also draw a box, but in addition limits
  2886.      relative screen output to the boundary of the window and can
  2887.      optionally set window and box colors. See the WINDOW command.
  2888.  
  2889.           Examples:
  2890.  
  2891.      1>ERASE
  2892.      1>BOX 2,10,12,40
  2893.      1>ERASE
  2894.      1>BOX 3,0,8,20 DOUBLE
  2895.      1>ERASE
  2896.      1>BOX 10,0,10,70
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.      BOX                        VPI1  VPI  VPIN                         BOX
  2909.      VP-Info Level 1 Reference Manual          Page 160          SECTION 4
  2910.  
  2911.  
  2912.  
  2913.                                      BREAK
  2914.  
  2915.      Exit to the bottom of a DO WHILE or REPEAT loop.
  2916.  
  2917.      ╔════════════════════════════════════════════════════════════════════╗
  2918.      ║ BREAK                                                              ║
  2919.      ╚════════════════════════════════════════════════════════════════════╝
  2920.  
  2921.           The BREAK command is used only in programs, in a DO WHILE or a
  2922.      REPEAT loop to exit at the bottom of the loop.  If there are nested
  2923.      loops, the exit is at the bottom of the innermost loop.  See DO WHILE
  2924.      and REPEAT.
  2925.  
  2926.           Contrast the command BREAK with the command LOOP which executes
  2927.      the condition at the top of the DO WHILE loop (see the LOOP command).
  2928.  
  2929.           Caution: BREAK can be used only within a DO WHILE or REPEAT loop;
  2930.      use anywhere else is an error with unpredictable results.
  2931.  
  2932.           Example:
  2933.  
  2934.      DO WHILE T
  2935.      <program segment>
  2936.         IF custn<>mcust
  2937.            BREAK
  2938.         ENDIF
  2939.      <program segment2>
  2940.      ENDDO
  2941.  
  2942.           This program carries out <program segment> and <program segment2>
  2943.      until CUSTN becomes different from MCUST; then it jumps over <program
  2944.      segment2> and leaves the loop.
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.      BREAK                      VPI1  VPI  VPIN                       BREAK
  2966.      VP-Info Level 1 Reference Manual          Page 161          SECTION 4
  2967.  
  2968.  
  2969.  
  2970.                                      BROWSE
  2971.  
  2972.      Edit fields in many records.
  2973.  
  2974.      ╔════════════════════════════════════════════════════════════════════╗
  2975.      ║ BROWSE [FIELDS <field list>]/[OFF]/[TEXT <textfile>] [APPEND]      ║
  2976.      ╟────────────────────────────────────────────────────────────────────╢
  2977.      ║ Options:                                                           ║
  2978.      ║                                                                    ║
  2979.      ║ FIELDS <field list>   specify the fields to be displayed           ║
  2980.      ║ APPEND    add a blank record and start BROWSE in that record       ║
  2981.      ║ OFF       rather than generate a BROWSE input screen, uses an      ║
  2982.      ║              exiting screen and its Get Table                      ║
  2983.      ║ TEXT <textfile> erases the screen, displays the text file, and     ║
  2984.      ║              then does BROWSE OFF                                  ║
  2985.      ╚════════════════════════════════════════════════════════════════════╝
  2986.  
  2987.           The BROWSE command displays the records (from the current record
  2988.      on) horizontally, one at a line; it displays as many fields as will
  2989.      fit on a line.  A column represents a field.
  2990.  
  2991.           If the selected file is indexed, the records are displayed in the
  2992.      indexed order.
  2993.  
  2994.           When the APPEND keyword is used, a blank record is appended to
  2995.      the data file and BROWSE begins in that record. The user may alternate
  2996.      between normal BROWSE and APPEND modes with the Ctrl-<PgDn> and <PgUp>
  2997.      editing keys.
  2998.  
  2999.           All the full-screen editing keys can be used.  Note that they
  3000.      have the same meaning as in EDIT, but sometimes they look different.
  3001.      For instance, the next record command (<PgDn> or Ctrl-C) gives a new
  3002.      screen in EDIT; in BROWSE, it simply moves the cursor down one line.
  3003.  
  3004.           Editing keys:
  3005.  
  3006.      <Left> or Ctrl-S        moves the cursor back one character
  3007.      <Right> or Ctrl-D       moves the cursor forward one character
  3008.      Ctrl-<Left>             moves to the beginning of the field
  3009.      Ctrl-<Right>            moves to the end of the field
  3010.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  3011.                                 inserted  (normally, you are in
  3012.                                 overtype mode: what you type overtypes the
  3013.                                 existing text); pressing <Ins> or Ctrl-V
  3014.                                 again, puts you back into overtype mode
  3015.      <BACKSPACE>             deletes the character to the left of the
  3016.                                 cursor
  3017.      <Del> or Ctrl-G         deletes the character on the cursor
  3018.      Ctrl-Y                  deletes the rest of the field
  3019.  
  3020.  
  3021.  
  3022.      BROWSE                     VPI1  VPI  VPIN                      BROWSE
  3023.      VP-Info Level 1 Reference Manual          Page 162          SECTION 4
  3024.  
  3025.  
  3026.  
  3027.      <Up> or Ctrl-E          moves the cursor to the previous field
  3028.      <Dn> or Ctrl-X          moves the cursor to the next field
  3029.  
  3030.      Ctrl-<Pg Dn>            Enters APPEND mode; adds a blank record and
  3031.                                 places the cursor in that new record
  3032.      Ctrl-Q                  quits and does not update the current record
  3033.      <End> or Ctrl-W         quits and updates the current record
  3034.      <PgUp> or Ctrl-R        moves to the previous record; when in APPEND
  3035.                                 mode, exist to normal BROWSE mode
  3036.      <PgDn> or Ctrl-C        moves to the next record
  3037.      Ctrl-L                  redraws the BROWSE screen with the next
  3038.                                 screenful of fields, referred to as the
  3039.                                 next "page"; if the file has no more
  3040.                                 fields, this key is ignored
  3041.      Ctrl-K                  redraws the BROWSE screen with the previous
  3042.                                 screenful of fields, referred to as the
  3043.                                 prior "page"; if the screen is already at
  3044.                                 the first field, this key is ignored
  3045.      Alt-E                   skips one screenful of record toward the
  3046.                                 beginning of the file and redisplays the
  3047.                                 BROWSE screen
  3048.      Alt-X                   skips one screenful of record toward the end
  3049.                                 of the file and redisplays the BROWSE
  3050.                                 screen
  3051.      Alt-W                   when the cursor is in a memo field, edit the
  3052.                                 current memo (if no current memo, one is
  3053.                                 created) and allow changes to be saved
  3054.      Alt-R                   when the cursor is in a memo field, view the
  3055.                                 current memo in read-only mode; no changes
  3056.                                 are saved
  3057.  
  3058.  
  3059.           BROWSE should be used to edit columns of data in a data file;
  3060.      that is, to edit a few fields of a number of records.  Use the command
  3061.      EDIT to edit many fields of a single records at the same time.
  3062.  
  3063.           The option FIELDS <field list> selects the fields to be displayed
  3064.      on the screen.
  3065.  
  3066.           SET MENU ON causes a small display at the top of the BROWSE
  3067.      screen, giving the use of major editing key.
  3068.  
  3069.           Examples:
  3070.  
  3071.      1>USE customer
  3072.      1>BROWSE
  3073.  
  3074.      Displays the following:
  3075.  
  3076.  
  3077.  
  3078.  
  3079.      BROWSE                     VPI1  VPI  VPIN                      BROWSE
  3080.      VP-Info Level 1 Reference Manual          Page 163          SECTION 4
  3081.  
  3082.  
  3083.  
  3084. ──────────────────────────────────────────────────────────────────────────────
  3085. #1 CUSTOMER.DBF                   VP-Info BROWSE
  3086.                                                                      Page 1
  3087. ┌────────────────────────────────────────────────────────────────────────────┐
  3088. │REC:  prev <PgUp>  next   <PgDn>  delete ^U      SCROLL:  left ^K  right ^L │
  3089. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  3090. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  3091. └────────────────────────────────────────────────────────────────────────────┘
  3092.         CUSTNU FIRSTNAME       LASTNAME             ADDRESS
  3093.       1 BROS50 Stan            Brown                786 Alexander Rd.
  3094.       2 BURS50 Sid             Bursten              876 Main St.
  3095.       3 GRAG50 George          Gratzer              876 Arlington Avenue
  3096.       4 MELB50 Bernie          Melman               9876 Ocean View Parkway
  3097.  
  3098. ──────────────────────────────────────────────────────────────────────────────
  3099.  
  3100.  
  3101.           To edit the home and work telephone numbers of the customers,
  3102.      issue the command:
  3103.  
  3104.  
  3105.      1>USE customer
  3106.      1>BROWSE FIELDS name,hphone,wphone
  3107.  
  3108.  
  3109.           The display:
  3110.  
  3111.  
  3112. ──────────────────────────────────────────────────────────────────────────────
  3113. #1 CUSTOMER.DBF                   VP-Info BROWSE
  3114.                                                                      Page 1
  3115. ┌────────────────────────────────────────────────────────────────────────────┐
  3116. │REC:  prev <PgUp>  next   <PgDn>  delete ^U      SCROLL:  left ^K  right ^L │
  3117. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  3118. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  3119. └────────────────────────────────────────────────────────────────────────────┘
  3120.              LASTNAME             HPHONE     WPHONE
  3121.            1 Brown                9238423472 3984747238
  3122.            2 Bursten              7658956    6575777
  3123.            3 Gratzer              7866457    7657655
  3124.            4 Melman               8765678    6765777
  3125.  
  3126. ──────────────────────────────────────────────────────────────────────────────
  3127.  
  3128.  
  3129.           VP-Info Level 1 offers two options that allow users to format
  3130.      their BROWSE screens to their specific requirements.
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.      BROWSE                     VPI1  VPI  VPIN                      BROWSE
  3137.      VP-Info Level 1 Reference Manual          Page 164          SECTION 4
  3138.  
  3139.  
  3140.           BROWSE OFF suppresses the standard BROWSE screen and uses an
  3141.      existing screen and its associated Get Table to accept the input. It
  3142.      is available only in a program.
  3143.  
  3144.           Example in a program:
  3145.  
  3146.      1>USE employee
  3147.      1>CLS
  3148.      1>TEXT add_empl
  3149.      1>BROWSE OFF
  3150.  
  3151.           BROWSE TEXT can be used in both conversational mode and programs.
  3152.      The following combines all the steps in the above example:
  3153.  
  3154.           Example:
  3155.  
  3156.      1>USE employee
  3157.      1>BROWSE TEXT add_empl
  3158.  
  3159.           The input screen can be constructed with either @ GET and TEXT
  3160.      command. See @ and TEXT commands.
  3161.  
  3162.  
  3163.                                   NOTES
  3164.  
  3165.  
  3166.      1.   BROWSE OFF is preferred over BROWSE TEXT is programs because
  3167.      an ON FIELD structure can be placed between the TEXT and the BROWSE
  3168.      commands to give programmers total control over the BROWSE process
  3169.  
  3170.      2.   <textfile>, when used in BROWSE TEXT, can be a DOS file, a
  3171.      library volume in the current library (addressed as .<volume>), or
  3172.      a memo in a current data file (address as M.<memo>).
  3173.  
  3174.      3.    Horizontal scrolling is available only with BROWSE and 
  3175.      BROWSE FIELDS, and not with BROWSE TEXT or BROWSE OFF.
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.      BROWSE                     VPI1  VPI  VPIN                      BROWSE
  3194.      VP-Info Level 1 Reference Manual          Page 165          SECTION 4
  3195.  
  3196.  
  3197.                                       CALL
  3198.  
  3199.      Execute a binary (assembly-language) program
  3200.  
  3201.      ╔════════════════════════════════════════════════════════════════════╗
  3202.      ║ CALL <programname> [<argument>]                                    ║
  3203.      ║                                                                    ║
  3204.      ║ <programname> a binary file to be executed under                   ║
  3205.      ║                  VP-Info Professional (not available under         ║
  3206.      ║                  Level 1); default extension BIN                   ║
  3207.      ╟────────────────────────────────────────────────────────────────────╢
  3208.      ║ Option:                                                            ║
  3209.      ║                                                                    ║
  3210.      ║ <argument>    a character memory variable used to transfer data    ║
  3211.      ║                  to and from a BIN program; maximum 254 characters ║
  3212.      ╚════════════════════════════════════════════════════════════════════╝
  3213.  
  3214.           VP-Info Professional only: Assembly-language programs, which have
  3215.      been copied from disk into a special area of memory called BINSPACE,
  3216.      can be executed internally by VP-Info Professional.
  3217.  
  3218.           Running a binary file requires three steps:
  3219.  
  3220.           1.   Allocate memory in the VPI.SET or VPIN.SET file using the
  3221.                BINSPACE=n where <n> is the number of 1K blocks to allocate
  3222.                to the BINSPACE in memory.  The limit for <n> is 32.
  3223.                Example: BINSPACE=32 allocates 32K.
  3224.  
  3225.           2.   BINLOAD the program. A program need only be loaded once
  3226.                (unless it is removed with the BINUNLOAD command).
  3227.                Additional requests to BINLOAD the program will reload it in
  3228.                the same memory space. Up to eight binary programs may be
  3229.                loaded at once. Example: BINLOAD test. (BIN program may be
  3230.                removed from memory with the BINUNLOAD command.)
  3231.  
  3232.           3.   CALL the binary program, with an optional argument of up to
  3233.                254 bytes in a memory variable.  The binary program may
  3234.                modify or replace the contents of this variable, but may not
  3235.                create or lengthen the contents; when execution is
  3236.                completed, the variable will have a new value.
  3237.  
  3238.           See BINLOAD and BINUNLOAD commands.
  3239.  
  3240.           Example:
  3241.  
  3242.           The binary program, listed below, merely overwrites the first
  3243.      three characters of a passed string with the string "VPI".
  3244.  
  3245.      dummy='1234567890'
  3246.      CALL test dummy
  3247.  
  3248.  
  3249.  
  3250.      CALL                           VPI  VPIN                          CALL
  3251.      VP-Info Level 1 Reference Manual          Page 166          SECTION 4
  3252.  
  3253.  
  3254.      ? dummy
  3255.  
  3256.      The current value of dummy would then be printed: "VPI4567890".
  3257.  
  3258.           Rules for BIN programs:
  3259.  
  3260.           1.   BIN programs are created in assembly language and assembled
  3261.                into an OBJ file with Microsoft's MASM program or
  3262.                equivalent, linked into a EXE file with LINK or equivalent,
  3263.                and converted into a BIN file with the DOS utility EXE2BIN.
  3264.  
  3265.           2.   The following is an example of an assembly-language module
  3266.                that accepts an input string in a memory-variable passed to
  3267.                the module on the CALL command line, modifies it, and passes
  3268.                it back in the same memory variable.
  3269.  
  3270.           ─────────────────────────────────────────────────────────────────
  3271.           ;  TESTBIN.ASM -- A sample program to illustrate the
  3272.           ;                 VP-Info BINLOAD and CALL facilities
  3273.           ;
  3274.           ;                 By Bernie Melman, Sub Rosa Publishing Inc.
  3275.           ;
  3276.           ;  This routine replaces the first three characters
  3277.           ;      in a passed string with the characters VPI
  3278.           ;
  3279.           ;  Assemble with MASM version 5.0
  3280.           ;  LINK to produce an EXE file (ignore the "No stack" warning)
  3281.           ;  EXE2BIN to generate BIN file
  3282.           ;
  3283.           _prog   segment byte
  3284.                   assume cs:_prog
  3285.           dtest   proc    far
  3286.                   mov [bx+0], byte ptr 'V'
  3287.                   mov [bx+1], byte ptr 'P'
  3288.                   mov [bx+2], byte ptr 'I'
  3289.                   mov ax,0            ;try changing bp to see if VP-Info
  3290.                                       ;   can recover regs ok
  3291.                   mov bp,ax           ;do it
  3292.                   ret
  3293.           dtest   endp
  3294.           _prog   ends
  3295.                   end
  3296.           ─────────────────────────────────────────────────────────────────
  3297.  
  3298.           3.   No argument is required, but if one is used, it must contain
  3299.                a string which the program can evaluate in location BX.
  3300.                VP-Info places a NUL (zero byte) after the string as a
  3301.                terminator; if the program processes characters until a zero
  3302.                is encountered in a byte, the entire string has been
  3303.                processed.  Any part of the string following the NUL is
  3304.                ignored by VP-Info.
  3305.  
  3306.  
  3307.      CALL                           VPI  VPIN                          CALL
  3308.      VP-Info Level 1 Reference Manual          Page 167          SECTION 4
  3309.  
  3310.  
  3311.  
  3312.           4.   The maximum length of a VP-Info string is 254 bytes;
  3313.                therefore, no more than 254 characters can be communicated
  3314.                to or from a binary program.
  3315.  
  3316.           5.   The BIN program cannot change the memory allocation of the
  3317.                argument variable. Therefore, it cannot successfully enlarge
  3318.                the argument string. It can shorten the result by
  3319.                terminating the result with a NUL (zero byte).
  3320.  
  3321.           6.   Sufficient space to load binary files must be provided with
  3322.                the BINSPACE= command in the VPI.SET or VPIN.SET file; and
  3323.                no more than eight binary files may be loaded at any one
  3324.                time.  BIN files can be removed from memory with the
  3325.                BINUNLOAD command.
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.      CALL                           VPI  VPIN                          CALL
  3365.      VP-Info Level 1 Reference Manual          Page 168          SECTION 4
  3366.  
  3367.  
  3368.  
  3369.                                      CANCEL
  3370.  
  3371.      Leave VP-Info Level 1 program.
  3372.  
  3373.      ╔════════════════════════════════════════════════════════════════════╗
  3374.      ║ CANCEL                                                             ║
  3375.      ╚════════════════════════════════════════════════════════════════════╝
  3376.  
  3377.           The command CANCEL aborts the VP-Info Level 1 program and enters
  3378.      the interactive mode; the VP-Info Level 1 prompt appears.  See also
  3379.      QUIT.
  3380.  
  3381.           Example:
  3382.  
  3383.           A VP-Info Level 1 program segment:
  3384.  
  3385.      CASE ans='8'
  3386.         QUIT
  3387.      CASE ans='9'
  3388.         CANCEL
  3389.  
  3390.           If the user chooses to go into VP-Info Level 1 (option 9), show
  3391.      the VP-Info Level 1 prompt.  Option 8 exits to the operating system.
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.      CANCEL                     VPI1  VPI  VPIN                      CANCEL
  3422.      VP-Info Level 1 Reference Manual          Page 169          SECTION 4
  3423.  
  3424.  
  3425.  
  3426.                                       CASE
  3427.  
  3428.      The switch in the DO CASE program structure.
  3429.  
  3430.      ╔════════════════════════════════════════════════════════════════════╗
  3431.      ║ CASE <cond>                                                        ║
  3432.      ║                                                                    ║
  3433.      ║ <cond>  if this condition is satisfied, the following program      ║
  3434.      ║           segment should be executed                               ║
  3435.      ╚════════════════════════════════════════════════════════════════════╝
  3436.  
  3437.           CASE is the keyword in the DO CASE program structure.
  3438.      VP-Info Level 1 evaluates the condition; if the condition is true, the
  3439.      following program segment is executed.  The program segment is
  3440.      terminated by the next CASE, by OTHERWISE, or by ENDCASE.  After the
  3441.      execution of the program segment, the program execution continues with
  3442.      the program line after the ENDCASE command.  If the condition is
  3443.      false, VP-Info Level 1 looks for the next CASE command.  If no
  3444.      condition is true, VP-Info Level 1 executes the program segment
  3445.      following the OTHERWISE command (if any).
  3446.  
  3447.           Note that when more than one <cond> is true in a DO CASE
  3448.      structure, only the program segment for the first is executed.
  3449.  
  3450.           See the command DO CASE.
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.      CASE                       VPI1  VPI  VPIN                        CASE
  3479.      VP-Info Level 1 Reference Manual          Page 170          SECTION 4
  3480.  
  3481.  
  3482.  
  3483.                                      CHAIN
  3484.  
  3485.      Leave the current VP-Info Level 1 program and start running a new
  3486.      VP-Info Level 1 program.
  3487.  
  3488.      ╔════════════════════════════════════════════════════════════════════╗
  3489.      ║ CHAIN <program>                                                    ║
  3490.      ║                                                                    ║
  3491.      ║ <program>   the name of the VP-Info Level 1 program to be run      ║
  3492.      ╚════════════════════════════════════════════════════════════════════╝
  3493.  
  3494.           The command CHAIN is used for executing a VP-Info Level 1 program
  3495.      from within another VP-Info Level 1 program or in the interactive mode
  3496.      from the VP-Info Level 1 prompt.  The program name <program> should
  3497.      not have an extension.  If there is a compiled program by this name
  3498.      (normal extension CPL; runtime extension RPL), it will be run.  If
  3499.      there is none, VP-Info Level 1 will run the uncompiled program
  3500.      (extension PRG).
  3501.  
  3502.           CHAIN does a CLEAR first, except that all global memory variables
  3503.      are preserved and passed to the <program>; to use them, the <program>
  3504.      must have a GLOBAL command declaring the variables.  (See the commands
  3505.      CLEAR and GLOBAL.)
  3506.  
  3507.           The CHAIN command does not return to the calling program;  the
  3508.      program in memory is replaced by the program it chains to.
  3509.  
  3510.           CHAIN is the most efficient way for one program to call another.
  3511.      The DO command calls a subroutine from the disk.  DO can often be
  3512.      replaced by PERFORM or by CHAIN.  (See the commands DO and PERFORM.
  3513.  
  3514.           When you chain from one program to another, VP-Info Level 1
  3515.      executes a CLEAR command before the start of the program, closing all
  3516.      the data files, index files, sequential files, and releasing all (but
  3517.      the global) variables. When you DO one program from another, the
  3518.      subroutine you do inherits the existing environment -- memory
  3519.      variables, data files, index files, etc. -- and returns to the DOing
  3520.      program when completed or when a RETURN command is executed.
  3521.  
  3522.           CHAIN allows the program name to be a macro.
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.      CHAIN                      VPI1  VPI  VPIN                       CHAIN
  3536.      VP-Info Level 1 Reference Manual          Page 171          SECTION 4
  3537.  
  3538.  
  3539.           Example:
  3540.  
  3541.      DO CASE
  3542.      CASE ans='1'
  3543.         CHAIN prog1
  3544.      CASE ans='2'
  3545.         CHAIN prog2
  3546.      CASE ans='3'
  3547.         CHAIN prog3
  3548.      ENDCASE
  3549.  
  3550.           This program segment chains to three different programs,
  3551.      depending on the value of ANS.
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.      CHAIN                      VPI1  VPI  VPIN                       CHAIN
  3593.      VP-Info Level 1 Reference Manual          Page 172          SECTION 4
  3594.  
  3595.  
  3596.  
  3597.  
  3598.                                      CLEAR
  3599.  
  3600.      Close all data files and index files, and clear memory variables.
  3601.      Optionally clear current Get Table or keyboard buffer.
  3602.  
  3603.      ╔════════════════════════════════════════════════════════════════════╗
  3604.      ║ CLEAR [GETS/KEYBOARD]                                              ║
  3605.      ╟────────────────────────────────────────────────────────────────────╢
  3606.      ║ Options:                                                           ║
  3607.      ║                                                                    ║
  3608.      ║ GETS           clear the Get Table from memory                     ║
  3609.      ║ KEYBOARD       delete all characters from the keyboard buffer      ║
  3610.      ║                   buffer                                           ║
  3611.      ╚════════════════════════════════════════════════════════════════════╝
  3612.  
  3613.           The CLEAR command with no options closes all open data files and
  3614.      index files,  and releases all memory variables, including the matrix
  3615.      variables.  (Sequential files, DOS files, system variables, and in
  3616.      particular, function keys, are not effected).
  3617.  
  3618.           Example:
  3619.  
  3620.      1>a=2
  3621.      1>name='David Barberr'
  3622.      1>avco='clear'
  3623.      1>LIST MEMORY
  3624.  
  3625.      Name          Type    Width    Contents
  3626.      A               N       8      2
  3627.      NAME            C      13      David Barberr
  3628.      AVCO            C       5      clear
  3629.      ** Total **  3  Variables used  26  Bytes used
  3630.      1>CLEAR
  3631.      1>LIST MEMORY
  3632.  
  3633.      Name          Type    Width    Contents
  3634.      ** Total **  0  Variables used  0  Bytes used
  3635.  
  3636.           CLEAR GETS removes the current Get Table from memory.  (See READ
  3637.      and ON FIELD commands.)
  3638.  
  3639.           CLEAR KEYBOARD eliminates any characters held in the keyboard
  3640.      buffer.  Normally, characters typed at the keyboard are stored in a
  3641.      special buffer until VP-Info Level 1 in ready to process them, but
  3642.      occasionally the programmer will want to be sure nothing is in the
  3643.      buffer before executing certain commands.  For example, CLEAR KEYBOARD
  3644.      before executing the MENU() function to ensure that a key pressed
  3645.      earlier in the program, or even in a previous program, does not
  3646.      inadvertently trigger a menu selection.
  3647.  
  3648.  
  3649.      CLEAR                      VPI1  VPI  VPIN                       CLEAR
  3650.      VP-Info Level 1 Reference Manual          Page 173          SECTION 4
  3651.  
  3652.  
  3653.  
  3654.           Caution to dBASE programmers: The CLEAR command in dBASE III and
  3655.           later versions erases the screen, but its function on
  3656.           VP-Info Level 1 is radically different.  To clear the screen, use
  3657.           the CLS command.
  3658.  
  3659.  
  3660.  
  3661.  
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.      CLEAR                      VPI1  VPI  VPIN                       CLEAR
  3707.      VP-Info Level 1 Reference Manual          Page 174          SECTION 4
  3708.  
  3709.  
  3710.  
  3711.                                      CLOSE
  3712.  
  3713.      Close the selected file.
  3714.  
  3715.      ╔════════════════════════════════════════════════════════════════════╗
  3716.      ║ CLOSE [ALL]                                                        ║
  3717.      ╟────────────────────────────────────────────────────────────────────╢
  3718.      ║ Option:                                                            ║
  3719.      ║                                                                    ║
  3720.      ║ ALL            close all data files in use                         ║
  3721.      ╚════════════════════════════════════════════════════════════════════╝
  3722.  
  3723.           The CLOSE command closes the selected data file, updates all
  3724.      information to the disk, and releases the data record buffer space
  3725.      (see Appendix A.1) used by this file. Any index files attached to the
  3726.      data file are also closed, and any limits, relations and filters
  3727.      associated with the data file are cleared.
  3728.  
  3729.           With the option ALL, all data files in use are closed.
  3730.  
  3731.           Examples:
  3732.  
  3733.      1>CLOSE
  3734.      1>CLOSE#3
  3735.      1>CLOSE ALL
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.      CLOSE                      VPI1  VPI  VPIN                       CLOSE
  3764.      VP-Info Level 1 Reference Manual          Page 175          SECTION 4
  3765.  
  3766.  
  3767.  
  3768.                                       CLS
  3769.  
  3770.      Erase screen.
  3771.  
  3772.      ╔════════════════════════════════════════════════════════════════════╗
  3773.      ║ CLS [<line1>,<line2>]                                              ║
  3774.      ╟────────────────────────────────────────────────────────────────────╢
  3775.      ║ Option:                                                            ║
  3776.      ║                                                                    ║
  3777.      ║ <line1>,<line2>   erase from line1 to line2                        ║
  3778.      ╚════════════════════════════════════════════════════════════════════╝
  3779.  
  3780.           This command erases the screen, and is a synonym for ERASE.
  3781.  
  3782.           If, optionally, two numeric expressions, line1 and line2, are
  3783.      given, it erases line1 and line2, and all lines between, if any.
  3784.      These expressions should have values between 0 and 24.
  3785.  
  3786.           CLS is the same as the following three commands:
  3787.  
  3788.      ERASE
  3789.      CLS 0,24
  3790.      ERASE 0,24
  3791.  
  3792.           Examples:
  3793.  
  3794.      1>CLS
  3795.      1>CLS 2,4
  3796.      1>CLS 12,12
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.      CLS                        VPI1  VPI  VPIN                         CLS
  3821.      VP-Info Level 1 Reference Manual          Page 176          SECTION 4
  3822.  
  3823.  
  3824.  
  3825.                                      COLOR
  3826.  
  3827.      Set the color attributes of a box on the screen.
  3828.  
  3829.      ╔════════════════════════════════════════════════════════════════════╗
  3830.      ║ COLOR <attrib>,<line1>,<col1>,<line2>,<col2>[,<fillchar>]          ║
  3831.      ║                                                                    ║
  3832.      ║ <attrib>       numeric expression between 0 and 255, the attribute ║
  3833.      ║ <line1>,<col1> the position of the upper-left corner of the box    ║
  3834.      ║ <line2>,<col2> the position of the lower-right corner of the box   ║
  3835.      ╟────────────────────────────────────────────────────────────────────╢
  3836.      ║ Option:                                                            ║
  3837.      ║                                                                    ║
  3838.      ║ <fillchar>     the ASCII number of the character used to fill the  ║
  3839.      ║                 colored area; every character position enclosed    ║
  3840.      ║                 in the area described by the row and column values ║
  3841.      ║                 is changed to the fill character                   ║
  3842.      ╚════════════════════════════════════════════════════════════════════╝
  3843.  
  3844.           Every character displayed on the screen has an attribute byte
  3845.      that determines how the character is displayed.  For monochrome
  3846.      monitors, the character may be bold, underlined, reverse, and so on.
  3847.      For color monitors, both the background and the character has color.
  3848.      These attribute bytes are set for a rectangular area by this command.
  3849.  
  3850.           The area is given by four numeric expressions -- line1, col1,
  3851.      line2, col2 -- as in the BOX and WINDOW commands.  The values must be
  3852.      separated by commas.
  3853.  
  3854.           For color monitors, compute ATTRIB by adding up (up to) four
  3855.      numbers: background+foreground+blink+brightness from the following
  3856.      tables:
  3857.  
  3858.           background         0  - black
  3859.                             16  - blue
  3860.                             32  - green
  3861.                             48  - cyan
  3862.                             64  - red
  3863.                             80  - magenta
  3864.                             96  - brown
  3865.                            112  - white
  3866.  
  3867.           foreground         0  - black
  3868.                              1  - blue
  3869.                              2  - green
  3870.                              3  - cyan
  3871.                              4  - red
  3872.                              5  - magenta
  3873.                              6  - brown
  3874.  
  3875.  
  3876.  
  3877.      COLOR                      VPI1  VPI  VPIN                       COLOR
  3878.      VP-Info Level 1 Reference Manual          Page 177          SECTION 4
  3879.  
  3880.  
  3881.                              7  - white
  3882.  
  3883.           blink              0  - no blink
  3884.                            128  - blink
  3885.  
  3886.           brightness         0  - normal
  3887.                              8  - intense
  3888.  
  3889.           For monochrome monitors the five important numbers are:
  3890.  
  3891.           standard white on black:   7
  3892.           underline:                 1
  3893.           reverse video:           112
  3894.  
  3895.           to get bold:         add   8
  3896.           to make it blink:    add 128
  3897.  
  3898.           See also SET COLOR TO <num exp> and :COLOR=<num exp>, which set
  3899.      the attribute bytes of the characters displayed.  SET COLOR TO 0 turns
  3900.      the command off: the attribute bytes remain unchanged at the displaced
  3901.      locations.  If a part of the screen already has attributes set by the
  3902.      COLOR command and SET COLOR TO 0, the newly displayed characters will
  3903.      keep the attributes set by the COLOR command.
  3904.  
  3905.           When filling an area with a fill character, as is often done in
  3906.      designing sign-on screens for example, the pattern characters 176 to
  3907.      178 and the solid reverse character 219 are especially useful.
  3908.  
  3909.           Examples:
  3910.  
  3911.           1.
  3912.  
  3913.      1>COLOR 20,2,0,12,79
  3914.  
  3915.      sets background blue and foreground red in lines 2 to 12.
  3916.  
  3917.           2.
  3918.  
  3919.      1>back=80
  3920.      1>foregrnd=1
  3921.      1>bright=8
  3922.      1>line=2
  3923.      1>col=0
  3924.      1>x=18
  3925.      1>y=50
  3926.      1>COLOR back+foregrnd+bright,line,col,line+x,col+y
  3927.  
  3928.           3.
  3929.  
  3930.      1>COLOR 17,2,10,4,12
  3931.  
  3932.  
  3933.  
  3934.      COLOR                      VPI1  VPI  VPIN                       COLOR
  3935.      VP-Info Level 1 Reference Manual          Page 178          SECTION 4
  3936.  
  3937.  
  3938.  
  3939.      underlines the text in a small box three lines deep and 3 characters
  3940.      wide on a monochrome monitor.
  3941.  
  3942.           4. The following program illustrates the use of the COLOR command
  3943.      on a color monitor:
  3944.  
  3945.      DIM NUM matrix[10]
  3946.      REPEAT 10 TIMES VARYING i
  3947.         matrix[i]=MOD(i,7)*16+7
  3948.      ENDREPEAT
  3949.      ERASE
  3950.      REPEAT 10 TIMES VARYING i
  3951.         COLOR matrix[i], 12-i, i*5, 12+i, 10+i*5
  3952.         DELAY .5
  3953.      ENDREPEAT
  3954.      ERASE
  3955.      COLOR 23, 0, 0, 24, 79
  3956.      REPEAT 10 TIMES VARYING i
  3957.         BOX 1+i, 7+i*3, 23-i, 73-i*3
  3958.         DELAY .15
  3959.      ENDREPEAT
  3960.      REPEAT 10 TIMES VARYING i
  3961.         COLOR matrix[i], 1+i, 7+i*3, 23-i, 73-i*3
  3962.         DELAY .5
  3963.      ENDREPEAT
  3964.  
  3965.           5. All output to an area of the screen may be made invisible by
  3966.      making the background and the foreground color the same.  For example,
  3967.  
  3968.      SET COLOR TO 0
  3969.      COLOR 0,10,0,13,79
  3970.  
  3971.      turns rows 10 to 13 to black on black.  Editing fields for entering
  3972.      passwords may be so protected.
  3973.  
  3974.           6. A set of overlapping frames can be created with pattern
  3975.      characters used as fill:
  3976.  
  3977.      COLOR 7,10,10,16,70,176    ;a shadow pattern
  3978.      COLOR 7,09,09,15,69,219    ;a solid pattern
  3979.      COLOR 7,10,10,14,69,32     ;fill with blanks to create area for text
  3980.  
  3981.  
  3982.  
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.      COLOR                      VPI1  VPI  VPIN                       COLOR
  3992.      VP-Info Level 1 Reference Manual          Page 179          SECTION 4
  3993.  
  3994.  
  3995.  
  3996.                                     COMPILE
  3997.  
  3998.      Compile a VP-Info Level 1 program.
  3999.  
  4000.      ╔════════════════════════════════════════════════════════════════════╗
  4001.      ║ COMPILE <file> [LINK]                                              ║
  4002.      ║                                                                    ║
  4003.      ║ <file>  the name of the program file                               ║
  4004.      ╟────────────────────────────────────────────────────────────────────╢
  4005.      ║ Option:                                                            ║
  4006.      ║                                                                    ║
  4007.      ║ LINK    If SET DO OFF, causes COMPILE to work as if SET DO ON      ║
  4008.      ╚════════════════════════════════════════════════════════════════════╝
  4009.  
  4010.           The COMPILE command may be given in interactive mode, or in a
  4011.      program:
  4012.  
  4013.      1>COMPILE prog
  4014.  
  4015.      where PROG is a file with PRG extension, the source program to be
  4016.      compiled.  <file> cannot be a macro, and should not have any extension
  4017.      specified.
  4018.  
  4019.           If you wish to compile many programs in one step, create a
  4020.      program (call it, say, PROJ.PRG) as follows:
  4021.  
  4022.      COMPILE prog1
  4023.      COMPILE prog2
  4024.      COMPILE prog3
  4025.  
  4026.           Then
  4027.  
  4028.      1>DO proj
  4029.  
  4030.      will compile PROG1, PROG2, PROG3.  Such a program should not use any
  4031.      memory variables, since a CLEAR is executed before every COMPILE
  4032.      command.
  4033.  
  4034.           SET ECHO ON to have all program lines displayed as they are
  4035.      compiled.
  4036.  
  4037.           See also Section 1.
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.      COMPILE                    VPI1  VPI  VPIN                     COMPILE
  4049.      VP-Info Level 1 Reference Manual          Page 180          SECTION 4
  4050.  
  4051.  
  4052.  
  4053.                                     CONTINUE
  4054.  
  4055.      Continue to LOCATE from the current record.
  4056.  
  4057.      ╔════════════════════════════════════════════════════════════════════╗
  4058.      ║ CONTINUE                                                           ║
  4059.      ╚════════════════════════════════════════════════════════════════════╝
  4060.  
  4061.           CONTINUE will carry on locating from the current record using the
  4062.      condition of the last LOCATE command.  (See the LOCATE command.)
  4063.  
  4064.           Note that the standard strings stored in function key F8 combines
  4065.      a CONTINUE and an EDIT command.  Once a LOCATE has been executed
  4066.      (function key F8), each additional matching record can be edited by
  4067.      pressing F8.
  4068.  
  4069.           Example:
  4070.  
  4071.      1>LOCATE FOR name<'S'
  4072.      1>EDIT
  4073.      1>CONTINUE
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.      CONTINUE                   VPI1  VPI  VPIN                    CONTINUE
  4106.      VP-Info Level 1 Reference Manual          Page 181          SECTION 4
  4107.  
  4108.  
  4109.  
  4110.                                       COPY
  4111.  
  4112.      Copy selected records of the selected file into a new file.
  4113.  
  4114.      ╔════════════════════════════════════════════════════════════════════╗
  4115.      ║ COPY [<scope>] TO <file> [FIELDS <field list> [FOR <cond>] [SDF/   ║
  4116.      ║       SDF DELIMITED [WITH <char>]]                                 ║
  4117.      ║                                                                    ║
  4118.      ║ <file> is the name of the file the records are copied to           ║
  4119.      ╟────────────────────────────────────────────────────────────────────╢
  4120.      ║ Options:                                                           ║
  4121.      ║                                                                    ║
  4122.      ║ <scope>                     select records by scope                ║
  4123.      ║                                (default scope: ALL)                ║
  4124.      ║ FIELDS <field list>         copy only selected fields              ║
  4125.      ║ FOR <cond>                  select records by condition            ║
  4126.      ║ SDF                         copy into sequential file              ║
  4127.      ║ SDF DELIMITED               separate fields by commas              ║
  4128.      ║ SDF DELIMITED [WITH <char>] separate fields by specified character ║
  4129.      ╚════════════════════════════════════════════════════════════════════╝
  4130.  
  4131.           The command COPY is used for moving records from the selected
  4132.      file to a new file, <file>; if a file by the name <file> already
  4133.      exists, it will be overwritten.
  4134.  
  4135.           If the SDF option is not used, the result will be a data file
  4136.      with the default extension DBF and the same structure as the source
  4137.      file, unless the FIELDS keyword is used with a fields list.
  4138.  
  4139.           When the SDF option is used, the result is a text file, with the
  4140.      default extension TXT.  When the DELIMITED keyword is not used, each
  4141.      record (or its selected fields) becomes one line in a sequential file;
  4142.      the fields are all merged.
  4143.  
  4144.           With the SDF DELIMITED option, the fields are separated by
  4145.      commas, and strings are enclosed in single quotes ('). A different
  4146.      string delimiter can be specified with the WITH clause: example WITH
  4147.      |.  The specified delimiter character is not enclosed in quotes.
  4148.  
  4149.           For a discussion of the SDF option, see the command APPEND FROM.
  4150.  
  4151.           Examples:
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.      COPY                       VPI1  VPI  VPIN                        COPY
  4163.      VP-Info Level 1 Reference Manual          Page 182          SECTION 4
  4164.  
  4165.  
  4166.      1>USE employee
  4167.      1>COPY TO empl1
  4168.            6 COPY(S)
  4169.      1>USE empl1
  4170.      1>DELETE 5
  4171.            1 DELETE(S)
  4172.      1>COPY TO empl3
  4173.            5 COPY(S)                  note: deleted records are not copied
  4174.      1>RECALL ALL
  4175.      1>COPY TO empl4 FOR salary <25000 .AND. year_emp>1980
  4176.            1 COPY(S)
  4177.      1>COPY TO empl4 FOR salary <25000 SDF DELIMITED WITH |
  4178.            1 COPY(S)
  4179.  
  4180.           The result of the last command is a sequential file EMPL4.TXT
  4181.      with one line as follows:
  4182.  
  4183.      |Marek|,|Mark|,|231R|,|Broomsdale|,|MD|,|02110|,|566-7012|,|y|,
  4184.      |11500|,|1984|,|Maintenance|
  4185.  
  4186.      1>COPY TO empl5 FOR salary <25000 FIELDS name,fname SDF DELIMITED WITH |
  4187.            1 COPY(S)
  4188.  
  4189.           The result of the last command is a sequential file EMPL5.TXT
  4190.      with one line as follows:
  4191.  
  4192.      |Marek|,|Mark|
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.      COPY                       VPI1  VPI  VPIN                        COPY
  4220.      VP-Info Level 1 Reference Manual          Page 183          SECTION 4
  4221.  
  4222.  
  4223.  
  4224.                                  COPY STRUCTURE
  4225.  
  4226.      Create a new file with the structure of the selected file.
  4227.  
  4228.      ╔════════════════════════════════════════════════════════════════════╗
  4229.      ║ COPY STRUCTURE TO <file> [FIELDS <field list>]                     ║
  4230.      ║                                                                    ║
  4231.      ║ <file>      the name of the new file                               ║
  4232.      ╟────────────────────────────────────────────────────────────────────╢
  4233.      ║ Option:                                                            ║
  4234.      ║                                                                    ║
  4235.      ║ FIELDS <field list>     copy only these fields                     ║
  4236.      ╚════════════════════════════════════════════════════════════════════╝
  4237.  
  4238.           The command COPY STRUCTURE creates a new data file with the same
  4239.      fields as the selected file, but with no records.  The default
  4240.      extension is DBF.
  4241.  
  4242.           If the FIELDS option is used, the new structure will contain only
  4243.      the fields listed.
  4244.  
  4245.           Example:
  4246.  
  4247.      1>USE employee
  4248.      1>COPY STRUCTURE TO emp1
  4249.      1>COPY STRUCTURE TO emp2 FIELDS name,fname,salary,married
  4250.      1>USE empl2
  4251.      1>LIST STRUCTURE
  4252.      Data file:           EMPL2.DBF
  4253.      Number of records:       0
  4254.      File number:             1
  4255.      Field   Name       Type Width   Dec
  4256.        1     NAME         C     15
  4257.        2     FNAME        C     10
  4258.        3     SALARY       N      9      2
  4259.        4     MARRIED      L      1
  4260.      ** Record Length **        36
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.      COPY STRUCTURE             VPI1  VPI  VPIN              COPY STRUCTURE
  4277.      VP-Info Level 1 Reference Manual          Page 184          SECTION 4
  4278.  
  4279.  
  4280.  
  4281.                                      COUNT
  4282.  
  4283.      Count selected records.
  4284.  
  4285.      ╔════════════════════════════════════════════════════════════════════╗
  4286.      ║ COUNT [<scope>] [TO <memvar>] [FOR <cond>]                         ║
  4287.      ╟────────────────────────────────────────────────────────────────────╢
  4288.      ║ Options:                                                           ║
  4289.      ║                                                                    ║
  4290.      ║ <scope>      select by scope (default scope: ALL)                  ║
  4291.      ║ TO <memvar>  store result in memory variable                       ║
  4292.      ║ FOR <cond>   select by condition                                   ║
  4293.      ╚════════════════════════════════════════════════════════════════════╝
  4294.  
  4295.           This command counts the number of records that meet the selection
  4296.      criteria.  Selection is by scope and/or by condition.  The result may
  4297.      be stored in a numeric memory variable; if the variable does not
  4298.      exist, this command creates it.
  4299.  
  4300.           <memvar> cannot be a numeric matrix variable.
  4301.  
  4302.           The result of the command COUNT is displayed if SET TALK ON, as
  4303.      in the examples below.
  4304.  
  4305.           Examples:
  4306.  
  4307.      1>USE employee
  4308.      1>COUNT
  4309.            6 COUNT(S)
  4310.      1>GO TOP
  4311.      1>COUNT NEXT 3 FOR name < 'O'
  4312.            2 COUNT(S)
  4313.      1>GO TOP
  4314.      1>COUNT FOR salary < 50000 TO raise
  4315.      1>? raise
  4316.           5.00
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.      COUNT                      VPI1  VPI  VPIN                       COUNT
  4334.      VP-Info Level 1 Reference Manual          Page 185          SECTION 4
  4335.  
  4336.  
  4337.  
  4338.                                      CREATE
  4339.  
  4340.      Create a new data file.
  4341.  
  4342.      ╔════════════════════════════════════════════════════════════════════╗
  4343.      ║ CREATE <file>                                                      ║
  4344.      ║                                                                    ║
  4345.      ║ <file>       the data file to create                               ║
  4346.      ╚════════════════════════════════════════════════════════════════════╝
  4347.  
  4348.           The command CREATE is used to make a new data file, <file>;
  4349.      <file> cannot be a macro.  (Do not use COMP for the first four letters
  4350.      of a data or index file; VP-Info Level 1 is unable to open such a
  4351.      file.)
  4352.  
  4353.           File creation is a special form of full-screen editing.  Each
  4354.      field in the data file is represented by four editing fields.
  4355.  
  4356.           Editing keys:
  4357.  
  4358.  
  4359.      <Left> or Ctrl-S        moves the cursor back one character
  4360.      <Right> or Ctrl-D       moves the cursor forward one character
  4361.      Ctrl-<Left>             moves to the beginning of the editing field
  4362.      Ctrl-<Right>            moves to the end of the editing field
  4363.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  4364.                                 inserted  (normally, you are in overtype mode:
  4365.                                 what you type overtypes the existing text);
  4366.                                 pressing <Ins> or Ctrl-V again, puts you back
  4367.                                 into overtype mode
  4368.      <BACKSPACE>             deletes the character to the left of the cursor
  4369.      <Del> or Ctrl-G         deletes the character on the cursor
  4370.      Ctrl-Y                  deletes the rest of the editing field
  4371.  
  4372.      <Up> or Ctrl-E          moves the cursor to the previous editing field
  4373.      <Dn> or Ctrl-X          moves the cursor to the next editing field
  4374.  
  4375.      Ctrl-Q                  quits and does not create the file
  4376.      <End> or Ctrl-W         quits and creates the file
  4377.  
  4378.      Ctrl-K                  moves back to the top of the previous page
  4379.      Ctrl-L                  moves to the top of the next page
  4380.  
  4381.      Ctrl-N                  inserts a line for a new field
  4382.      Ctrl-T                  deletes the line describing a field
  4383.  
  4384.  
  4385.           VP-Info Level 1 supports four separate type of data files as
  4386.      follows:
  4387.  
  4388.  
  4389.  
  4390.      CREATE                     VPI1  VPI  VPIN                      CREATE
  4391.      VP-Info Level 1 Reference Manual          Page 186          SECTION 4
  4392.  
  4393.  
  4394.  
  4395.           Type 0 - Compatible with VP-Info Professional files.  Type 0
  4396.                files can have up to 256 fields in Level 1 and up to 500
  4397.                fields in VP-Info Professional.  Although VP-Info Level 1
  4398.                can handle only 65,535 records, Type 0 files can hold up to
  4399.                4 billion records in VP-Info Professional.
  4400.  
  4401.           Type 1 - Compatible with VP-Info and MAX Type I files.  (MAX is
  4402.                an earlier versions of VP-Info and VP-Info Professional,
  4403.                also created by Sub Rosa.)  Type I files can have up to
  4404.                256 fields in Level 1 and up to 500 fields in VP-Info
  4405.                Professional.  Maximum of 65,636 records in all versions.
  4406.  
  4407.           Type 2 - Compatible with dBASE II data files, and are limited to
  4408.                32 fields.  Maximum of 65,636 records in all versions.
  4409.  
  4410.           Type 3 - Compatible with dBASE III, dBASE III+ and dBASE IV data
  4411.                files.  Type III files can have up to 256 fields in Level 1
  4412.                and up to 500 fields in VP-Info Professional, although dBASE
  4413.                III and dBASE III+ cannot read a data file with more than
  4414.                128 fields, and dBASE IV cannot read a data file with more
  4415.                than 255 fields.  Although VP-Info Level 1 can handle only
  4416.                65,535 records, Type 3 files can hold up to 2 billion records
  4417.                in VP-Info Professional.
  4418.  
  4419.           When all the fields are specified using the full-screen input
  4420.      display of the CREATE command, the user is asked to specify which type
  4421.      of file to create; the default is Type 3.
  4422.  
  4423.           If the data file already exists, you will be given the
  4424.      opportunity to delete it.  On a network with SET NETWORK ON in VP-Info
  4425.      Professional Network Edition, attempting to delete a data file while
  4426.      another user is accessing a file with the same name will cause a LOCK
  4427.      error.
  4428.  
  4429.  
  4430.           Example:
  4431.  
  4432.      1>CREATE custfile
  4433.  
  4434.      shows the following screen after all the fields have been entered:
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.      CREATE                     VPI1  VPI  VPIN                      CREATE
  4446.      VP-Info Level 1 Reference Manual          Page 187          SECTION 4
  4447.  
  4448.  
  4449.  
  4450. ──────────────────────────────────────────────────────────────────────────────
  4451. Sunday, August 12, 1990
  4452.                               VP-Info                      CUSTFILE.DBF
  4453. Name         Type    Width   Dec        Name         Type    Width   Dec
  4454. CUSTNUM       C        6      0         BIRTHDAY      C        6      0
  4455. FIRSTNAME     C       15      0         SS_NUM        C        9      0
  4456. LASTNAME      C       20      0         EMPL_NUM      C        6      0
  4457. ADDRESS       C       25      0
  4458. CITY          C       15      0
  4459. STATE         C        2      0
  4460. ZIP           C        9      0
  4461. HPHONE        C       10      0
  4462. WPHONE        C       10      0
  4463. SPOUSEFNAM    C       15      0
  4464. SPOUSENAME    C       20      0
  4465. DEPENDENTS    N        2      0
  4466. ┌────────────────────────────────────────────────────────────────────────────┐
  4467. │ UP/DOWN           COLUMN MOVE  ROW            SAVE STRUCTURE    C..Strings │
  4468. │ previous. <PgUp>  left... ^K   insert... ^N   update... <End>   N..Numbers │
  4469. │ next..... <PgDn>  right.. ^L   delete... ^T   nochange. ^Q      L..Yes/No  │
  4470. └────────────────────────────────────────────────────────────────────────────┘
  4471.  
  4472. ──────────────────────────────────────────────────────────────────────────────
  4473.  
  4474.  
  4475.           There are up to 12 fields described in each column, with four
  4476.      editing windows per field.  All the standard full-screen editing keys
  4477.      are available in CREATE, including Ctrl-K and Ctrl-L to move from
  4478.      column to column.
  4479.  
  4480.           As in BROWSE, <Pg Up> and <Pg Dn> are used to move from line to
  4481.      line, while <Up> and <Dn> are used to move between editing windows on
  4482.      the same line.
  4483.  
  4484.           Error checking is done by VP-Info Level 1 as you enter the
  4485.      specifications for the new fields when you leave a line.  Here are
  4486.      some of the messages you may see:
  4487.  
  4488.         The first character of a field name must be a letter.
  4489.         Invalid character in the Name field.
  4490.         Name fields must be unique.
  4491.         Types:  C-character  N-numeric  L-logical  D-date  F-float  M-memo.
  4492.         Field Length must be greater than 0.
  4493.         Length of character field can not exceed 254.
  4494.         Length of numeric field can not exceed 20.
  4495.         Decimals cannot exceed 6.
  4496.         Decimals too large for length.
  4497.  
  4498.  
  4499.  
  4500.  
  4501.      CREATE                     VPI1  VPI  VPIN                      CREATE
  4502.      VP-Info Level 1 Reference Manual          Page 188          SECTION 4
  4503.  
  4504.  
  4505.  
  4506.           Caution for VP-Info Professional users:  Be sure you have set
  4507.           FIELDS= in the VPI.SET or VPIN.SET file to a number large enough
  4508.           to accommodate all the fields in all the data files you will ever
  4509.           have open at one time, plus the largest number of fields in any
  4510.           of these files.  Default is 320 fields.  See FIELDS=.
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.      CREATE                     VPI1  VPI  VPIN                      CREATE
  4559.      VP-Info Level 1 Reference Manual          Page 189          SECTION 4
  4560.  
  4561.  
  4562.  
  4563.                                      CURSOR
  4564.  
  4565.      Move the cursor to a given screen position.
  4566.  
  4567.      ╔════════════════════════════════════════════════════════════════════╗
  4568.      ║ CURSOR <row>,<col>                                                 ║
  4569.      ╚════════════════════════════════════════════════════════════════════╝
  4570.  
  4571.           CURSOR moves the current cursor position to a given point on the
  4572.      screen.  Combined with the ?? command, it gives the user all the
  4573.      absolute positioning control of the @ SAY command without its
  4574.      restrictions.
  4575.  
  4576.           CURSOR is usually employed when the MENU( function is used, to
  4577.      place the selection bar correctly.
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.      CURSOR                     VPI1  VPI  VPIN                      CURSOR      VP-Info Level 1 Reference Manual           Page 190          SECTION 4
  4616.  
  4617.  
  4618.  
  4619.                                      DEBUG
  4620.  
  4621.      Print expression or expression list for debugging purposes.
  4622.  
  4623.      ╔════════════════════════════════════════════════════════════════════╗
  4624.      ║ DEBUG <exp list>                                                   ║
  4625.      ║                                                                    ║
  4626.      ║ <exp list>   the expressions to be displayed                       ║
  4627.      ╚════════════════════════════════════════════════════════════════════╝
  4628.  
  4629.           This command displays the expressions exactly as does the ?
  4630.      command.  However, if SET DEBUG OFF, the expressions are not
  4631.      displayed.  This may save the programmer the trouble of having to
  4632.      place the DEBUG commands in the program when debugging, and having to
  4633.      take them out for the regular running of the program.
  4634.  
  4635.           See SET DEBUG.
  4636.  
  4637.           Examples (in a program):
  4638.  
  4639.      DEBUG number
  4640.      DEBUG 'current amount: ', amount, '   current balance: ', balance
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.      DEBUG                      VPI1  VPI  VPIN                       DEBUG      VP-Info Level 1 Reference Manual           Page 191          SECTION 4
  4673.  
  4674.  
  4675.                                      DELAY
  4676.  
  4677.      Suspend execution for a specified number of seconds.
  4678.  
  4679.      ╔════════════════════════════════════════════════════════════════════╗
  4680.      ║ DELAY <num exp>                                                    ║
  4681.      ║                                                                    ║
  4682.      ║ <num exp>    the number of seconds execution is to be delayed      ║
  4683.      ╚════════════════════════════════════════════════════════════════════╝
  4684.  
  4685.           This command suspends program execution for a specified number of
  4686.      seconds.
  4687.  
  4688.           The delay can be any length from .06 seconds upward. For
  4689.      programmers, this command can replace complex loops which often have
  4690.      the deficiency of varying in length depending on what type of computer
  4691.      the program is run on.
  4692.  
  4693.           Example:
  4694.  
  4695.      1>DELAY .5
  4696.      1>number=3
  4697.      1>DELAY number
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.      DELAY                      VPI1  VPI  VPIN                       DELAY      VP-Info Level 1 Reference Manual           Page 192          SECTION 4
  4730.  
  4731.  
  4732.  
  4733.                                      DELETE
  4734.  
  4735.      Delete selected records from the selected data file.
  4736.  
  4737.      ╔════════════════════════════════════════════════════════════════════╗
  4738.      ║ DELETE [<scope>] [FOR <cond>]                                      ║
  4739.      ╟────────────────────────────────────────────────────────────────────╢
  4740.      ║ Options:                                                           ║
  4741.      ║                                                                    ║
  4742.      ║ <scope>        select by scope (default scope: current record)     ║
  4743.      ║ FOR <cond>     select by condition                                 ║
  4744.      ╚════════════════════════════════════════════════════════════════════╝
  4745.  
  4746.           The DELETE command is used to set the DELETED flag for records in
  4747.      the selected data file.
  4748.  
  4749.           These records can be recovered by the RECALL command or with
  4750.      Ctrl-U in the BROWSE and EDIT commands, provided SET DELETE is OFF.
  4751.  
  4752.           Deleted records are not "seen" by certain VP-Info Level 1
  4753.      commands irrespective of SET DELETE status, including: COPY, POST,
  4754.      UPDATE, SUM, AVERAGE, COUNT.
  4755.  
  4756.           To remove all the records with the deleted flag set, use the PACK
  4757.      command.  (See the commands: SET DELETE, RECALL, PACK.)
  4758.  
  4759.           Examples:
  4760.  
  4761.      1>USE employee
  4762.      1>COPY TO empl1
  4763.            6 COPY(S)
  4764.      1>USE#3 empl1
  4765.      1>DELETE RECORD 2
  4766.            1 DELETE(S)
  4767.      1>DELETE#3 RECORD 5
  4768.            1 DELETE(S)
  4769.      1>SKIP
  4770.      1>DELETE NEXT 3 FOR salary < 25000
  4771.            1 DELETE(S)
  4772.      1>PACK#3
  4773.            5 TOTAL PACKED
  4774.      1>PACK
  4775.            4 TOTAL PACKED
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.      DELETE                     VPI1  VPI  VPIN                      DELETE      VP-Info Level 1 Reference Manual           Page 193          SECTION 4
  4787.  
  4788.  
  4789.  
  4790.                                   DELETE FILE
  4791.  
  4792.      Remove files from disk.
  4793.  
  4794.      ╔════════════════════════════════════════════════════════════════════╗
  4795.      ║ DELETE FILE <file>                                                 ║
  4796.      ║                                                                    ║
  4797.      ║ <file>      the name of the file to be deleted                     ║
  4798.      ╚════════════════════════════════════════════════════════════════════╝
  4799.  
  4800.           The DELETE FILE command deletes a file from the disk.  This
  4801.      command should be used with care because, once deleted, the file
  4802.      cannot be recovered.  If no extension is given, the extension DBF is
  4803.      assumed.  Wildcards are not permitted.
  4804.  
  4805.           On a network with SET NETWORK ON in VP-Info Professional Network
  4806.      Edition, attempting to delete a file while another user is accessing
  4807.      it will cause a LOCK error.
  4808.  
  4809.           Examples:
  4810.  
  4811.  
  4812.    1>DIR c*.dbf
  4813.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  4814.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  4815.    CUSTOMER.DBF     734 11-29-89 10:43p   CUST2.DBF        734  3-19-90  7:03p
  4816.  
  4817.    21940 bytes in 6 files.
  4818.    5246976 bytes remaining.
  4819.    1>DELETE FILE cust2
  4820.    1>DIR c*.dbf
  4821.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  4822.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  4823.    CUSTOMER.DBF     734 11-29-89 10:43p
  4824.  
  4825.    21206 bytes in 5 files.
  4826.    5251072 bytes remaining.
  4827.    734 characters were copied.
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.      DELETE FILE                VPI1  VPI  VPIN                 DELETE FILE      VP-Info Level 1 Reference Manual           Page 194          SECTION 4
  4844.  
  4845.  
  4846.  
  4847.                                       DIM
  4848.  
  4849.      Define a memory variable as a matrix.
  4850.  
  4851.      ╔════════════════════════════════════════════════════════════════════╗
  4852.      ║ DIM CHAR [<width>] <memvar>[x1,x2,x3],<memvar2>[y1,y2,y3],...      ║
  4853.      ║ DIM NUM <memvar>[x1,x2,x3],<memvar2>[y1,y2,y3],...                 ║
  4854.      ║ DIM LOG <memvar>[x1,x2,x3],<memvar2>[y1,y2,y3],...                 ║
  4855.      ║                                                                    ║
  4856.      ║ <memvar>, <memvar2>  the names of the memory variables that        ║
  4857.      ║                         are defined as matrices                    ║
  4858.      ╟────────────────────────────────────────────────────────────────────╢
  4859.      ║ Option:                                                            ║
  4860.      ║                                                                    ║
  4861.      ║ <width>   the width of the character variables                     ║
  4862.      ╚════════════════════════════════════════════════════════════════════╝
  4863.  
  4864.           Matrices of up to 3 dimensions can be defined for each of the
  4865.      three data types (CHARACTER, NUMERIC, LOGICAL).  The width of the
  4866.      entries of CHAR matrices is fixed; it is 10 if not specified by the
  4867.      user.
  4868.  
  4869.           Note that in the syntax description of DIM, [x1,x2,x3] does not
  4870.      indicate an option.  [ and ] must be present in a DIM command.  x1,
  4871.      x2, x3 are integer numbers greater than zero, not variables, up to
  4872.      three in number.
  4873.  
  4874.           Examples:
  4875.  
  4876.           One dimensional matrices (also called vectors):
  4877.  
  4878.      DIM CHAR a[12]
  4879.      DIM CHAR 20 a[12]
  4880.      DIM CHAR a[12],b[12]
  4881.      DIM NUM a[21]
  4882.      DIM LOG a[20]
  4883.  
  4884.           Two dimensional matrices (also called tables):
  4885.  
  4886.      DIM CHAR 25 first[10,20]
  4887.      DIM NUM second[5,20]
  4888.  
  4889.           Three dimensional matrixes:
  4890.  
  4891.      DIM CHAR 10 a[10,10,10]
  4892.      DIM NUM b[5,5,50]
  4893.  
  4894.           A mixed definition:
  4895.  
  4896.      DIM CHAR 12 a[50],b[2,2,12]
  4897.  
  4898.           Note that the width of both A and B is 12.
  4899.  
  4900.      DIM                        VPI1  VPI  VPIN                         DIM      VP-Info Level 1 Reference Manual           Page 195          SECTION 4
  4901.  
  4902.  
  4903.  
  4904.           Matrix variables can be used just like all other memory variables
  4905.      except that only = and STORE can assign values to them.  Commands and
  4906.      functions that create memory variables (such as the command COUNT) or
  4907.      store values in existing memory variables (such as the command READ or
  4908.      the function READ() cannot directly use matrix variables. Matrix
  4909.      variables cannot be used in a TEXT structure or TEXT file.
  4910.  
  4911.           Matrix variables are stored in high memory (see Section A).  The
  4912.      size of a matrix is at most 64K.  Use the STATUS command to find out
  4913.      how much high memory is available.  Numeric variables take 8 bytes and
  4914.      logical variables take 2 bytes of memory for each entry.
  4915.  
  4916.           Notes: The numbering is from 1.  Matrices can be redimensioned in
  4917.      a program.  No part of a DIM command can be a macro.
  4918.  
  4919.           Examples:
  4920.  
  4921.                                            Memory use (in bytes)
  4922.      1>DIM CHAR 25 name[40]                      1,000
  4923.      1>DIM CHAR fill[10,7]                         700
  4924.      1>DIM NUM b[2,3],total[10,20,5]                48 and 8000
  4925.      1>DIM LOG abc[5000]                        10,000
  4926.  
  4927.      1>? name[14]
  4928.      GEORGE
  4929.      1>c=300
  4930.      1>? abc[c]
  4931.      F
  4932.      1>total[4,15,3]=total[3,15,3]*563.123
  4933.      1>DIM NUM money[10]
  4934.      1>USE employee
  4935.      1>SUM salary TO temp
  4936.      1>money[1]=temp
  4937.  
  4938.           The effect of SET WIDTH TO on displaying matrix variables:
  4939.  
  4940.  
  4941.      1>DIM NUM num[20]
  4942.      1>? num
  4943.           0.00      0.00      0.00      0.00      0.00      0.00      0.00
  4944.           0.00      0.00      0.00      0.00      0.00      0.00      0.00
  4945.           0.00      0.00      0.00      0.00      0.00      0.00
  4946.      1>SET WIDTH TO 30
  4947.      1>? num
  4948.           0.00      0.00      0.00
  4949.           0.00      0.00      0.00
  4950.           0.00      0.00      0.00
  4951.           0.00      0.00      0.00
  4952.           0.00      0.00      0.00
  4953.           0.00      0.00      0.00
  4954.           0.00      0.00
  4955.  
  4956.  
  4957.      DIM                        VPI1  VPI  VPIN                         DIM      VP-Info Level 1 Reference Manual           Page 196          SECTION 4
  4958.  
  4959.  
  4960.  
  4961.                                       DIR
  4962.  
  4963.      Directory listing.
  4964.      ╔════════════════════════════════════════════════════════════════════╗
  4965.      ║ DIR [<pathname>][<file specification>]                             ║
  4966.      ╟────────────────────────────────────────────────────────────────────╢
  4967.      ║ Options:                                                           ║
  4968.      ║                                                                    ║
  4969.      ║ <pathname>            DOS directory name, with optional drive      ║
  4970.      ║                          letter and colon                          ║
  4971.      ║ <file specification>  a file name, with optional DOS windcards;    ║
  4972.      ║                          extension is required if present          ║
  4973.      ╚════════════════════════════════════════════════════════════════════╝
  4974.  
  4975.           This command is similar to the DIR command of the DOS operating
  4976.      system: it displays the list of files on the current disk, together
  4977.      with file size and date and time created or last modified.  Total size
  4978.      of all matching files is also given along with the bytes remaining on
  4979.      the disk.
  4980.  
  4981.           If a file name is given in full, the directory will show only
  4982.      that one file.
  4983.  
  4984.           A partial listing of the directory can be specified by giving a
  4985.      <file specification> with wild card characters.
  4986.  
  4987.           The wild card character ? may be replaced by any single
  4988.      character; the wild card character * allows any string.
  4989.  
  4990.           Examples:
  4991.  
  4992.  
  4993.    1>DIR
  4994.    SEN_NAME.NDX    1024 10-24-89  1:07a   SEN_NUM.NDX     1024 10-24-89  1:07a
  4995.    SEN_REIN.PRG     757  8-31-89 11:30p   SEN_SYST.DBF      53  9-06-89  9:02a
  4996.    SEN_ZIP.NDX     1024 10-24-89  1:07a   SUBDUE.ARC    342658 11-29-89  8:25p
  4997.    SUBDUE.PRG      2027 11-29-89  7:21p   SUBDUE2.PRG     1168 11-29-89  2:29a
  4998.  
  4999.    349735 bytes in 8 files.
  5000.    5251072 bytes remaining.
  5001.    1>dir \*.
  5002.    LIB           <DIR>   8-04-89  2:42p   MAX           <DIR>   8-04-89  1:27p
  5003.    RELTEST       <DIR>   8-06-89 10:27a   SILVERAD      <DIR>   8-07-89  2:32p
  5004.    SUPER         <DIR>   8-27-89  8:30p   TMP           <DIR>   8-04-89  1:28p
  5005.    V14           <DIR>   8-23-89  9:22p   VAWORK        <DIR>   8-04-89 12:09p
  5006.    MANUAL        <DIR>  10-30-89 10:53a   GEN           <DIR>  11-08-89 12:00a
  5007.  
  5008.    0 bytes in 10 files.
  5009.    5251072 bytes remaining.
  5010.  
  5011.  
  5012.  
  5013.  
  5014.      DIR                        VPI1  VPI  VPIN                         DIR      VP-Info Level 1 Reference Manual           Page 197          SECTION 4
  5015.  
  5016.  
  5017.    1>DIR c*.dbf
  5018.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  5019.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  5020.    CUSTOMER.DBF     734 11-29-89 10:43p
  5021.  
  5022.    21206 bytes in 5 files.
  5023.    5251072 bytes remaining.
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.  
  5042.  
  5043.  
  5044.  
  5045.  
  5046.  
  5047.  
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.      DIR                        VPI1  VPI  VPIN                         DIR
  5072.      VP-Info Level 1 Reference Manual           Page 198          SECTION 4
  5073.  
  5074.  
  5075.  
  5076.                                       DIRF
  5077.  
  5078.      Directory listing, following redirection commands of the current FILES
  5079.      structure.
  5080.  
  5081.      ╔════════════════════════════════════════════════════════════════════╗
  5082.      ║ DIRF [<file specification>]                                        ║
  5083.      ╟────────────────────────────────────────────────────────────────────╢
  5084.      ║ Options:                                                           ║
  5085.      ║                                                                    ║
  5086.      ║ <file specification>  a file name, with optional DOS windcards;    ║
  5087.      ║                          extension is required if present          ║
  5088.      ╚════════════════════════════════════════════════════════════════════╝
  5089.  
  5090.           VP-Info Level 1 provides for a FILES structure (see FILES) which
  5091.      lets you specify default drive letters and/or directories for the
  5092.      various files used by the programs.  Usually file types are grouped
  5093.      into individual directories according to "skeletons" constructed with
  5094.      wildcards.  For example:
  5095.  
  5096.      FILES
  5097.      *.dbf,\data\
  5098.      *.cpl,\cpl\
  5099.      *.ndx,\indexes\
  5100.      ENDFILES
  5101.  
  5102.           The DIRF command is similar to the DIR command, except that the
  5103.      file specification is compared to the existing FILES structure and, if
  5104.      a match is made, the redirection in the structure is applied to the
  5105.      file specification, so that the directory displayed is of the
  5106.      redirected directory, not the current directory.
  5107.  
  5108.           It displays a list of all matching files in that directory,
  5109.      together with file size and date and time created or last modified.
  5110.      Total size of all matching files is also given along with the bytes
  5111.      remaining on the current disk.
  5112.  
  5113.           If a file name is given in full, the directory will show only
  5114.      that one file.  The wild card character ? may be replaced by any
  5115.      single character; the wild card character * allows any string.
  5116.  
  5117.           Examples:
  5118.  
  5119.    1>DIRF *.dbf
  5120.    CCUST.DBF        522 10-13-88  5:42p   COMMS.DBF       6546  1-06-90  5:11p
  5121.    COMMS2.DBF      6342  1-07-90  1:00p   CUSTJUNK.DBF    7062  9-17-89  3:57p
  5122.    CUSTOMER.DBF     734 11-29-89 10:43p
  5123.  
  5124.    21206 bytes in 5 files.
  5125.    5251072 bytes remaining.
  5126.  
  5127.  
  5128.  
  5129.      FIRF                       VPI1  VPI  VPIN                        DIRF      VP-Info Level 1 Reference Manual           Page 199          SECTION 4
  5130.  
  5131.  
  5132.  
  5133.                                     DISPLAY
  5134.  
  5135.      Display information, memory variables, system variables, file
  5136.      structure.
  5137.  
  5138.      ╔════════════════════════════════════════════════════════════════════╗
  5139.      ║ DISPLAY [<scope>] [FOR <cond>] [<exp list>] [OFF]                  ║
  5140.      ║ DISPLAY FILES [LIKE <skeleton>] [ON <drive letter>]                ║
  5141.      ║ DISPLAY MEMORY                                                     ║
  5142.      ║ DISPLAY STRUCTURE                                                  ║
  5143.      ║ DISPLAY SYSTEM                                                     ║
  5144.      ╟────────────────────────────────────────────────────────────────────╢
  5145.      ║ Options (for displaying data file records):                        ║
  5146.      ║                                                                    ║
  5147.      ║ <scope>            select by scope (default: the current record)   ║
  5148.      ║ FOR <cond>         select by condition                             ║
  5149.      ║ OFF                do not display the record number                ║
  5150.      ╟────────────────────────────────────────────────────────────────────╢
  5151.      ║ Options (for listing directories):                                 ║
  5152.      ║                                                                    ║
  5153.      ║ LIKE <skeleton>    the file specification, with optional wildcards ║
  5154.      ║ ON <drive letter>  a drive designation, with optional colon        ║
  5155.      ╚════════════════════════════════════════════════════════════════════╝
  5156.  
  5157.           These commands are exactly the same as the LIST commands except
  5158.      for the following differences: the default scope of the DISPLAY
  5159.      command is the current record rather than the whole file; the listing
  5160.      is stopped at the bottom of the screen or current window (about every
  5161.      20 lines when displaying data file contents).
  5162.  
  5163.           See the commands: LIST, LIST FILES, LIST MEMORY, LIST STRUCTURE,
  5164.      and LIST SYSTEM.
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.      DISPLAY                    VPI1  VPI  VPIN                     DISPLAY      VP-Info Level 1 Reference Manual           Page 200          SECTION 4
  5187.  
  5188.  
  5189.  
  5190.                                        DO
  5191.  
  5192.      In a program, execute a subroutine and, on completion, return to the
  5193.      next command in the calling program; in Conversational
  5194.      VP-Info Level 1, equivalent to CHAIN.
  5195.  
  5196.      ╔════════════════════════════════════════════════════════════════════╗
  5197.      ║ DO <file>                                                          ║
  5198.      ║                                                                    ║
  5199.      ║ <file>   the name of the program called                            ║
  5200.      ╚════════════════════════════════════════════════════════════════════╝
  5201.  
  5202.           In Conversational VP-Info Level 1, DO is the same as CHAIN: it
  5203.      begins the execution of the compiled program with the name <file> with
  5204.      extension CPL; otherwise, the uncompiled VP-Info Level 1 program
  5205.      <file> will be compiled "on the fly" and executed, and the compiled
  5206.      file immediately deleted from the disk.
  5207.  
  5208.           Note that an uncompiled program with a GLOBAL statement cannot be
  5209.      compiled on the fly if it needs to import variable values, since
  5210.      compile step includes a CLEAR command.
  5211.  
  5212.           In a program, the command DO <file> causes the program <file> to
  5213.      be compiled as a subroutine of the current program.  No matter how
  5214.      many subroutines are called, all will be compiled into the same CPL
  5215.      file as the calling program.  The subroutines become overlays; they
  5216.      are called into memory when needed.
  5217.  
  5218.           When the called program executes a RETURN command, the execution
  5219.      resumes in the current program with the line following the DO command.
  5220.  
  5221.           The called program can itself DO other subroutines.  There can be
  5222.      subroutines up to 10 levels.
  5223.  
  5224.           When a subroutine is compiled, all information about data files
  5225.      and memory variables is coded in the compiled form: the environment is
  5226.      compiled with the subroutine.  Contrast this with the CHAIN command
  5227.      that starts with a clean slate.
  5228.  
  5229.           Any time a subroutine is invoked with a DO, the called program
  5230.      becomes an overlay.  If a subroutine is called 5 times, it is compiled
  5231.      5 times.  This, of course, would make for very bulky programs.
  5232.  
  5233.           The solution of this problem is very simple.  If the subroutine
  5234.      TEST is not sensitive to the environment (it does not use any fields
  5235.      or memory variables, or all data files and memory variable names are
  5236.      the same throughout the calling program), DO it as follows:
  5237.  
  5238.      ...
  5239.      PERFORM STEST
  5240.      ...
  5241.      PERFORM STEST
  5242.  
  5243.      DO                         VPI1  VPI  VPIN                          DO      VP-Info Level 1 Reference Manual           Page 201          SECTION 4
  5244.  
  5245.  
  5246.      ...
  5247.      *
  5248.      PROCEDURE STEST
  5249.         DO TEST
  5250.      ENDPROCEDURE
  5251.  
  5252.      This way, TEST becomes a single overlay; it is invoked with PERFORM
  5253.      STEST.
  5254.  
  5255.           Note: If the same subroutine is called from two places in the
  5256.      same program, but the two places have different environments, the
  5257.      subroutine cannot be called from a single procedure, and has to be
  5258.      compiled twice.
  5259.  
  5260.           For example, assume that TEST carries out some computation on
  5261.      some fields of the data file HISTORY1 and some memory variables, and
  5262.      then carries out the same computations on some fields of the data file
  5263.      HISTORY2 and some memory variables;  HISTORY1 is file 2, while
  5264.      HISTORY2 is file 3.
  5265.  
  5266.           Create two procedures:
  5267.  
  5268.      PROCEDURE TEST1
  5269.         SELECT 2
  5270.         DO TEST
  5271.      ENDPROCEDURE
  5272.      *
  5273.      PROCEDURE TEST2
  5274.         SELECT 3
  5275.         DO TEST
  5276.      ENDPROCEDURE
  5277.  
  5278.           Now if you need to invoke TEST with the first environment
  5279.      (HISTORY1), then PERFORM TEST1; otherwise, PERFORM TEST2.
  5280.  
  5281.           All procedures called by a subroutine must be contained in the
  5282.      PRG file of the subroutine.  A procedure of the calling program cannot
  5283.      have the same name as a procedure of the subroutine.  It is good
  5284.      programming practice not to have the same name for procedures and
  5285.      subroutines.
  5286.  
  5287.           Procedures are internally compiled, while subroutines become
  5288.      overlays.  Therefore, procedures are faster in execution.  However,
  5289.      there is a limit of 32 procedures in total for one CPL file.  See
  5290.      CHAIN and PERFORM.
  5291.  
  5292.           The name of the PRG file used with the DO command cannot be a
  5293.      macro.
  5294.  
  5295.           Example in Conversational VP-Info Level 1:
  5296.  
  5297.      DO INVOICE
  5298.  
  5299.  
  5300.      DO                         VPI1  VPI  VPIN                          DO      VP-Info Level 1 Reference Manual           Page 202          SECTION 4
  5301.  
  5302.  
  5303.           This will execute INVOICE.CPL if present; otherwise it will
  5304.      compile and execute INVOICE.PRG, and then delete the CPL file.
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.      DO                         VPI1  VPI  VPIN                          DO      VP-Info Level 1 Reference Manual           Page 203          SECTION 4
  5358.  
  5359.  
  5360.  
  5361.                                     DO CASE
  5362.  
  5363.      Switch the program flow to a number of cases.
  5364.  
  5365.      ╔════════════════════════════════════════════════════════════════════╗
  5366.      ║ DO CASE                                                            ║
  5367.      ╚════════════════════════════════════════════════════════════════════╝
  5368.  
  5369.           The command DO CASE provides for the processing of a number of
  5370.      options without the use of nested IF commands.  It is used in
  5371.      conjunction with the CASE, OTHERWISE, and ENDCASE commands.
  5372.  
  5373.           The DO CASE program structure is as follows:
  5374.  
  5375.      DO CASE
  5376.      CASE <cond1>
  5377.         <program segment1>
  5378.      CASE <cond2>
  5379.         <program segment2>
  5380.      ...
  5381.      CASE <condn>
  5382.         <program segmentn>
  5383.      OTHERWISE
  5384.         <program segment>
  5385.      ENDCASE
  5386.  
  5387.      where <cond1>, <cond2>, <cond3>,..., <condn> are conditions,  <program
  5388.      segment1>, <program segment2>,..., <program segmentn> and <program
  5389.      segment> are program segments, that is, any number of VP-Info Level 1
  5390.      program lines.
  5391.  
  5392.           Execution is as follows:
  5393.  
  5394.           After the DO CASE is encountered, VP-Info Level 1 looks for the
  5395.      first CASE command and evaluates the condition; if the condition is
  5396.      true, the following program segment is executed, terminated by the
  5397.      next CASE, by OTHERWISE, or by ENDCASE.  After the execution of the
  5398.      program segment, the program execution continues with the program line
  5399.      after the ENDCASE command.
  5400.  
  5401.           If the condition is false, VP-Info Level 1 looks for the next
  5402.      CASE command.  If no condition is true, VP-Info Level 1 executes the
  5403.      program segment following the OTHERWISE command (if any).
  5404.  
  5405.           The OTHERWISE command is optional.  Note that if more than one
  5406.      condition holds, only the segment after the first true condition is
  5407.      executed.
  5408.  
  5409.           DO case commands can be nested up to 10 levels.
  5410.  
  5411.           Example:
  5412.  
  5413.  
  5414.      DO CASE                    VPI1  VPI  VPIN                     DO CASE      VP-Info Level 1 Reference Manual           Page 204          SECTION 4
  5415.  
  5416.  
  5417.      ans2='P'
  5418.      @ 22,10 SAY 'E-edit  A-add  O-order  L-look  Q-quit ' GET ans2
  5419.      READ
  5420.      @ 22,10
  5421.      DO CASE
  5422.      CASE UPPER(ans2)='Q'
  5423.         picked=f
  5424.         ok=f
  5425.         LOOP
  5426.      CASE UPPER(ans2)='E'
  5427.         @ y,3 GET style
  5428.         @ y,10 GET color
  5429.         @ y,14 GET descript
  5430.         @ y,35 GET q1
  5431.         @ y,39 GET q2
  5432.         @ y,43 GET q3
  5433.         @ y,47 GET q4
  5434.         @ y,51 GET q5
  5435.         @ y,55 GET q6
  5436.         @ y,59 GET q7
  5437.         @ y,63 GET q8
  5438.         READ
  5439.         IF q1+q2+q3+q4+q5+q6+q7+q8=0
  5440.            DELETE
  5441.         ENDIF
  5442.         mpick=t
  5443.      CASE UPPER(ans2)='O'
  5444.         REPLACE type WITH 'O'
  5445.      ...
  5446.      OTHERWISE
  5447.         IF type='P'
  5448.            REPLACE type WITH 'O'
  5449.         ENDIF
  5450.         picked=f
  5451.      ENDCASE
  5452.  
  5453.           When editing with the internal VP-Info Level 1 programming editor
  5454.      (see WRITE command), Alt-F reformats the file with all structures
  5455.      properly indented, making it easy to see unbalanced structures.
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.      DO CASE                    VPI1  VPI  VPIN                     DO CASE      VP-Info Level 1 Reference Manual           Page 205          SECTION 4
  5472.  
  5473.  
  5474.  
  5475.                                     DO WHILE
  5476.  
  5477.      The standard program loop command.
  5478.  
  5479.      ╔════════════════════════════════════════════════════════════════════╗
  5480.      ║ DO WHILE <cond>                                                    ║
  5481.      ║                                                                    ║
  5482.      ║ <cond>      the condition controlling the loop                     ║
  5483.      ╚════════════════════════════════════════════════════════════════════╝
  5484.  
  5485.           The command DO WHILE starts the program loop.  The structure of
  5486.      the loop is as follows:
  5487.  
  5488.      DO WHILE <cond>
  5489.         <program segment>
  5490.      ENDDO
  5491.  
  5492.           Execution is as follows:
  5493.  
  5494.           After the DO WHILE is encountered, <cond> is evaluated.  If
  5495.      <cond> is true, the VP-Info Level 1 program segment (terminated by the
  5496.      ENDDO) is executed; then <cond> is evaluated again.  If <cond> is
  5497.      false, execution continues with the command following ENDDO.
  5498.  
  5499.           There can be a DO WHILE command within a DO WHILE command; this
  5500.      is called nesting.  Many level of nesting is permitted; however, too
  5501.      many levels of nesting will give a compile-time error message: Stack
  5502.      overflow.
  5503.  
  5504.           There are two commands that facilitate moving to the top and the
  5505.      bottom of the loop: LOOP moves the execution to the top of the loop,
  5506.      and BREAK exits the loop.
  5507.  
  5508.           There is one more looping command in VP-Info Level 1: REPEAT.
  5509.      (See the commands BREAK, LOOP, REPEAT.)
  5510.  
  5511.           Examples:
  5512.  
  5513.           1. Typical DO WHILE to process all the records of a file:
  5514.  
  5515.      USE employee
  5516.      ERASE
  5517.      DO WHILE .NOT. EOF
  5518.         ? name, fname, tel_no
  5519.         SKIP
  5520.      ENDDO
  5521.  
  5522.           2. Typical DO WHILE for counting how many records to list:
  5523.  
  5524.      count=0
  5525.      USE records
  5526.      DO WHILE count<100
  5527.  
  5528.      DO WHILE                   VPI1  VPI  VPIN                    DO WHILE      VP-Info Level 1 Reference Manual           Page 206          SECTION 4
  5529.  
  5530.  
  5531.         ? invoice_no,amount*qty
  5532.         SKIP
  5533.         count=count+1
  5534.      ENDDO
  5535.  
  5536.           When editing with the internal VP-Info Level 1 programming editor
  5537.      (see WRITE command), Alt-F reformats the file with all structures
  5538.      properly indented, making it easy to see unbalanced structures.
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.  
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.  
  5564.  
  5565.  
  5566.  
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.      DO WHILE                   VPI1  VPI  VPIN                    DO WHILE      VP-Info Level 1 Reference Manual           Page 207          SECTION 4
  5586.  
  5587.  
  5588.  
  5589.                                       EDIT
  5590.  
  5591.      Edit records in a data file.
  5592.  
  5593.      ╔════════════════════════════════════════════════════════════════════╗
  5594.      ║ EDIT [<recnum>] [FIELDS <field list> / OFF / TEXT <textfile>]      ║
  5595.      ╟────────────────────────────────────────────────────────────────────╢
  5596.      ║ Options                                                            ║
  5597.      ║                                                                    ║
  5598.      ║ <recnum>              begin EDIT on record number <recnum>         ║
  5599.      ║ FIELDS <field list>   the fields to be edited                      ║
  5600.      ║ TEXT <textfile>       erases the screen, displays the text file,   ║
  5601.      ║                          and then does EDIT using the text file    ║
  5602.      ║                          layout and embedded format pictures       ║
  5603.      ╟────────────────────────────────────────────────────────────────────╢
  5604.      ║ Option:                                                            ║
  5605.      ║                                                                    ║
  5606.      ║ OFF                   rather than generate an EDIT input screen,   ║
  5607.      ║                          uses an exiting screen and its Get Table  ║
  5608.      ╚════════════════════════════════════════════════════════════════════╝
  5609.  
  5610.           The EDIT command without either the OFF or TEXT option allows the
  5611.      user to view and modify records in the selected file.  Once the
  5612.      command is given, the screen shows the current record (or the record
  5613.      optionally specified with <recnum>) in full-screen editing mode.
  5614.  
  5615.           If the FIELDS keyword and a fields list is specified, only those
  5616.      fields will be available during EDIT; otherwise, VP-Info Level 1
  5617.      builds an input screen using all fields in the current data file.
  5618.  
  5619.           To exit from EDIT, use <End> (or Ctrl-W) once you have filled in
  5620.      the fields of the last record desired.  To switch from EDIT to APPEND
  5621.      mode, press Ctrl-<PgDn>, while <PgUp> switches back from APPEND into
  5622.      EDIT mode.
  5623.  
  5624.           Note that APPEND is actually a special mode of EDIT; the only
  5625.      difference is that EDIT begins by displaying the current record, while
  5626.      APPEND adds a new blank record to the data file and displays that. All
  5627.      the editing fields are the same for both EDIT and APPEND.
  5628.  
  5629.           EDIT updates all index files in use.
  5630.  
  5631.           The command SET MENU ON displays the most important editing keys
  5632.      at the top of the screen, except if OFF or TEXT keyword is used, or if
  5633.      the current window is less than 80 characters wide or 10 rows deep.
  5634.  
  5635.           Editing keys:
  5636.  
  5637.      <Left> or Ctrl-S        moves the cursor back one character
  5638.      <Right> or Ctrl-D       moves the cursor forward one character
  5639.      Ctrl-<Left>             moves to the beginning of the field
  5640.      Ctrl-<Right>            moves to the end of the field
  5641.  
  5642.      EDIT                       VPI1  VPI  VPIN                        EDIT      VP-Info Level 1 Reference Manual           Page 208          SECTION 4
  5643.  
  5644.  
  5645.      <Ins> or Ctrl-V         puts you in insert mode: what you type gets
  5646.                                 inserted  (normally, you are in overtype
  5647.                                 mode:  what you type overtypes the existing
  5648.                                 text); pressing <Ins> or Ctrl-V again, puts
  5649.                                 you back into overtype mode
  5650.      <BACKSPACE>             deletes the character to the left of the
  5651.                                 cursor
  5652.      <Del> or Ctrl-G         deletes the character on the cursor
  5653.      Ctrl-Y                  deletes the rest of the field
  5654.      <Up> or Ctrl-E          moves the cursor to the previous field
  5655.      <Dn> or Ctrl-X          moves the cursor to the next field
  5656.      Ctrl-Q                  quits and does not update the current record
  5657.      <End> or Ctrl-W         quits and updates the current record
  5658.      <PgUp> or Ctrl-R        edits the previous record; if in APPEND mode,
  5659.                                 exits to EDIT mode
  5660.      <PgDn> or Ctrl-C        edits the next record
  5661.      Ctrl-<Pg Dn>            Enters APPEND mode; adds a blank record and
  5662.                                 places the cursor in that new record
  5663.      Ctrl-K                  moves back to the top of the previous page
  5664.                                 (not with OFF or TEXT keywords)
  5665.      Ctrl-L                  moves to the top of the next page (not with
  5666.                                 OFF or TEXT keywords)
  5667.      Alt-W                   when the cursor is in a memo field, edit the
  5668.                                 current memo (if no current memo, one is
  5669.                                 created) and allow changes to be saved
  5670.      Alt-R                   when the cursor is in a memo field, view the
  5671.                                 current memo in read-only mode; no changes
  5672.                                 are saved
  5673.  
  5674.           Examples:
  5675.  
  5676.      1>USE employee
  5677.      1>GO 2
  5678.      1>EDIT
  5679.  
  5680.  
  5681.      1>EDIT 2
  5682.  
  5683.           You then see:
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.      EDIT                       VPI1  VPI  VPIN                        EDIT      VP-Info Level 1 Reference Manual           Page 209          SECTION 4
  5699.  
  5700.  
  5701.  
  5702. ─────────────────────────────────────────────────────────────────────────────
  5703. #1 EMPLOYEE.DBF                                      EDIT Record       2
  5704.                                                                      Page 1
  5705. ┌────────────────────────────────────────────────────────────────────────────┐
  5706. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U        PAGE:  prev ^K  next ^L │
  5707. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  5708. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  5709. └────────────────────────────────────────────────────────────────────────────┘
  5710.  
  5711. NAME...........  Steiner
  5712. FNAME..........  Tom
  5713. ADDR...........  114 North Pitt St.
  5714. CITY...........  Lakewood
  5715. STATE..........  MD
  5716. ZIP............  02111
  5717. TEL_NO.........  596-0017
  5718. MARRIED........  y
  5719. SALARY.........   35780.00
  5720. YEAR_EMP.......  1984
  5721. DEPT...........  Engineering
  5722. ─────────────────────────────────────────────────────────────────────────────
  5723.  
  5724.  
  5725.           To edit only a few fields:
  5726.  
  5727.      1>USE employee
  5728.      1>SET MENU ON
  5729.      1>EDIT FIELDS name, fname, tel_no
  5730.  
  5731.           This displays:
  5732.  
  5733.  
  5734. ─────────────────────────────────────────────────────────────────────────────
  5735. #1 EMPLOYEE.DBF                                      EDIT Record       7
  5736.                                                                      Page 1
  5737. ┌────────────────────────────────────────────────────────────────────────────┐
  5738. │REC:  prev <PgUp>  next   <PgDn>  delete  ^U        PAGE:  prev ^K  next ^L │
  5739. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  5740. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  5741. └────────────────────────────────────────────────────────────────────────────┘
  5742.  
  5743. NAME...........  Marek
  5744. FNAME..........  Joe
  5745. TEL_NO.........  566-7012
  5746. ─────────────────────────────────────────────────────────────────────────────
  5747.  
  5748.  
  5749.      The following examples show EDIT using the TEXT and OFF keywords
  5750. combined with an external text file (output from both is identical; OFF
  5751. allows the added flexibility of using an internal TEXT structure and/or
  5752. an ON FIELD structure):
  5753.  
  5754.  
  5755.      EDIT                       VPI1  VPI  VPIN                        EDIT      VP-Info Level 1 Reference Manual           Page 210          SECTION 4
  5756.  
  5757.  
  5758.      1>USE employee
  5759.      1>EDIT TEXT employee
  5760.  
  5761.      1>USE employee
  5762.      1>TEXT Employee
  5763.      1>EDIT OFF
  5764.  
  5765.           These both display:
  5766.  
  5767. ─────────────────────────────────────────────────────────────────────────────
  5768.                                                      EDIT Record      23
  5769.  
  5770.  
  5771.       NAME...........  ARTHUR                NEUMANN
  5772.  
  5773.       ADD_1..........  4274 MATHERS BLVD. E.           UPSON DOWNS
  5774.       ZIP............  59768
  5775.  
  5776.       PHONE..........  243-5548 (614)
  5777.       WPHONE.........  643-5657 (614)
  5778.  
  5779.       EXPERIENCE.....
  5780.           ACCT STUDENT, WORKED FOR CPA SCARECROW & MOSCOWITZ, BOSTON
  5781.       COMMENTS
  5782.           KNOWS INCOME-TAX LAW, WITH SPECIALTIES IN DEPRECIATION AND
  5783.           TAX SHELTERS; SUGGEST ASSIGN TO CENTRAL OFFICE
  5784. ─────────────────────────────────────────────────────────────────────────────
  5785.  
  5786.            See the TEXT command for a full discussion of the TEXT command.
  5787.      The TEXT used for the above input screen:
  5788.  
  5789. ─────────────────────────────────────────────────────────────────────────────
  5790. .. zip,!9! 9!9
  5791. .. phone,999-9999 (999)
  5792. .. wphone,999-9999 (999)
  5793. .. training,99/99
  5794.  
  5795.       NAME...........  %FNAME  %NAME
  5796.  
  5797.       ADD_1..........  %ADD_1  %AREA
  5798.       ZIP............  @ZIP
  5799.  
  5800.       PHONE..........  @PHONE
  5801.       WPHONE.........  @WPHONE
  5802.  
  5803.       EXPERIENCE.....
  5804.           @EXPERIENCE
  5805.       COMMENTS
  5806.           @COMMENT1
  5807.           @COMMENT2
  5808. ─────────────────────────────────────────────────────────────────────────────
  5809.  
  5810.  
  5811.  
  5812.      EDIT                       VPI1  VPI  VPIN                        EDIT      VP-Info Level 1 Reference Manual           Page 211          SECTION 4
  5813.  
  5814.  
  5815.            The following demonstration program illustrates use of EDIT OFF:
  5816.  
  5817. ────────────────────────────────────────────────────────────────────────────
  5818. **********************************************************************
  5819. *  EDIToff.prg   demonstration program for the EDIT OFF command
  5820. *     Note the technique used to "wrap" the file...when skipping
  5821. *     past EOF, program "wraps to top of file, and vice versa,
  5822. *     using new SOUND command to beep (silent if NOEFFECTS in VPI.SET).
  5823. *  (C) 1990 Sub Rosa Publishing Inc.  (Author: Sidney L. Bursten)
  5824. **********************************************************************
  5825. USE customer
  5826. ON escape              ;what to do when <Esc> is pressed
  5827.    WINDOW              ;cancel small window
  5828.    CURSOR 23,0         ;put cursor in bottom left corner of screen
  5829.    CANCEL              ;exit program
  5830. ENDON
  5831. WINDOW
  5832. ERASE
  5833. TEXT
  5834. ┌────────────────────────────────────────────────────────────────────────────┐
  5835. │REC:  prev <PgUp>  next   <PgDn>                           DELETE RECORD ^U │
  5836. │FILE: top  ^<Home> bottom ^<End>      DELETE: char <Del> to end of field ^Y │
  5837. │APPEND MODE: begin ^<PgDn> exit <PgUp>    EXIT: with save <End>  no save ^Q │
  5838. └────────────────────────────────────────────────────────────────────────────┘
  5839. ENDTEXT
  5840. WINDOW 8,10,17,69 double
  5841. TEXT
  5842. .. custnum,!!!-!-99
  5843. .. hphone,999-9999 (999)
  5844. .. wphone,999-9999 (999)
  5845. .. state,!!
  5846. Enter customer data:
  5847.  
  5848.     Number...... @custnum
  5849.     Name........ %firstname %lastname
  5850.     Address..... @address
  5851.     City, State. %city %state
  5852.     Zip Code.... @zip
  5853.     Phones (H/W) %hphone   %wphone
  5854. ENDTEXT
  5855. DO WHILE t
  5856.    EDIT off            ;edit using Get Table created with TEXT above
  5857.    DO CASE
  5858.    CASE :key=335       ;exit loop when <End> key pressed
  5859.       BREAK
  5860.    CASE eof            ;skipped past end of file; start again at top
  5861.       SOUND 11
  5862.       GOTO top
  5863.    CASE #<1            ;backed up past beginning of file; start again at bottom
  5864.       SOUND 11
  5865.       GOTO bottom
  5866.  
  5867.      EDIT                       VPI1  VPI  VPIN                        EDIT      VP-Info Level 1 Reference Manual           Page 212          SECTION 4
  5868.  
  5869.  
  5870.       IF eof           ;if no undeleted records left in file, get out
  5871.          BREAK
  5872.       ENDIF
  5873.    ENDCASE
  5874. ENDDO
  5875. WINDOW                 ;cancel small window
  5876. CURSOR 23,0            ;put cursor in bottom left corner of screen
  5877. ────────────────────────────────────────────────────────────────────────────
  5878.  
  5879.                         Page 213 intentionally omitted
  5880.  
  5881.  
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.  
  5888.  
  5889.  
  5890.  
  5891.  
  5892.  
  5893.  
  5894.  
  5895.  
  5896.  
  5897.  
  5898.  
  5899.  
  5900.  
  5901.  
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.      EDIT                       VPI1  VPI  VPIN                        EDIT      VP-Info Level 1 Reference Manual           Page 214          SECTION 4
  5924.  
  5925.  
  5926.  
  5927.                                      EJECT
  5928.  
  5929.      Start a new page on the printer.
  5930.  
  5931.      ╔════════════════════════════════════════════════════════════════════╗
  5932.      ║ EJECT                                                              ║
  5933.      ╚════════════════════════════════════════════════════════════════════╝
  5934.  
  5935.           The EJECT command sends a form feed (eject page, top of form)
  5936.      signal to the printer.
  5937.  
  5938.           This also resets the line and column counters to 0 for the
  5939.      @ commands.
  5940.  
  5941.           EJECT will attempt to advance the printer whether printing is on
  5942.      or off.  If your printer is on but off-line, your program may appear
  5943.      to hang; either put the printer on-line, or turn off the printer to
  5944.      release VP-Info Level 1 to continue processing.
  5945.  
  5946.           When spooling (see SPOOL), the form-feed is placed into the spool
  5947.      file, and has no effect on the printer until the file is spooled or
  5948.      copied to the printer.
  5949.  
  5950.           (See the commands @, SET FORMAT TO PRINT, SET PRINT ON, SET EJECT
  5951.      ON/OFF, SET LENGTH TO, and the functions ROW( and COL(.
  5952.  
  5953.           Examples:
  5954.  
  5955.      1>EJECT
  5956.  
  5957.           In a program, EJECT and SPOOL may be used together to reset the
  5958.      line counter to zero before printing begins:
  5959.  
  5960.      SPOOL junk
  5961.      EJECT
  5962.      SPOOL
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.  
  5975.  
  5976.  
  5977.  
  5978.  
  5979.  
  5980.      EJECT                      VPI1  VPI  VPIN                       EJECT      VP-Info Level 1 Reference Manual           Page 215          SECTION 4
  5981.  
  5982.  
  5983.  
  5984.                                       ELSE
  5985.  
  5986.      The optional part of an IF program structure.
  5987.  
  5988.      ╔════════════════════════════════════════════════════════════════════╗
  5989.      ║ ELSE                                                               ║
  5990.      ╚════════════════════════════════════════════════════════════════════╝
  5991.  
  5992.           This command introduces the optional part of the program
  5993.      structure IF/ENDIF.  See the command IF.
  5994.  
  5995.           Example:
  5996.  
  5997.      IF count>5
  5998.         ok=t
  5999.      ELSE
  6000.         IF count<2
  6001.            ok=f
  6002.         ENDIF
  6003.         ? 'ok'
  6004.      ENDIF
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.  
  6020.  
  6021.  
  6022.  
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028.  
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037.      ELSE                       VPI1  VPI  VPIN                        ELSE      VP-Info Level 1 Reference Manual           Page 216          SECTION 4
  6038.  
  6039.  
  6040.  
  6041.                                   END commands
  6042.  
  6043.      Terminate a command structure.
  6044.  
  6045.      ╔════════════════════════════════════════════════════════════════════╗
  6046.      ║ ENDCASE                                                            ║
  6047.      ║ ENDDO                                                              ║
  6048.      ║ ENDIF                                                              ║
  6049.      ║ ENDFILES                                                           ║
  6050.      ║ ENDON                                                              ║
  6051.      ║ ENDPROCEDURE                                                       ║
  6052.      ║ ENDREPEAT                                                          ║
  6053.      ║ ENDTEXT                                                            ║
  6054.      ╚════════════════════════════════════════════════════════════════════╝
  6055.  
  6056.           All VP-Info Level 1 structures are terminated with a matching END
  6057.      command as shown above.  When editing with the internal
  6058.      VP-Info Level 1 programming editor (see WRITE command), Alt-F
  6059.      reformats the file with all structures properly indented, making it
  6060.      easy to see unbalanced structures.
  6061.  
  6062.           See DO CASE, DO WHILE, IF,  FILES, ON ERROR, ON ESCAPE, ON FIELD,
  6063.      PROCEDURE, REPEAT, and TEXT.
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.  
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.  
  6086.  
  6087.  
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.      END Commands               VPI1  VPI  VPIN                END Commands      VP-Info Level 1 Reference Manual           Page 217          SECTION 4
  6095.  
  6096.  
  6097.  
  6098.                                      ERASE
  6099.  
  6100.      Erase screen.
  6101.  
  6102.      ╔════════════════════════════════════════════════════════════════════╗
  6103.      ║ ERASE [line1,line2]                                                ║
  6104.      ╟────────────────────────────────────────────────────────────────────╢
  6105.      ║ Option:                                                            ║
  6106.      ║                                                                    ║
  6107.      ║ line1, line2   erase from line1 to line2                           ║
  6108.      ╚════════════════════════════════════════════════════════════════════╝
  6109.  
  6110.           This command erases the screen, and is a synonym for CLS.
  6111.  
  6112.           If, optionally, two numeric expressions, line1 and line2, are
  6113.      given, it erases line1 and line2, and all lines between, if any.
  6114.      These expressions should have values between 0 and 24.
  6115.  
  6116.           ERASE is the same as the following three commands:
  6117.  
  6118.      CLS
  6119.      ERASE 0,24
  6120.      CLS 0,24
  6121.  
  6122.           Examples:
  6123.  
  6124.      1>ERASE
  6125.      1>ERASE 2,4
  6126.      1>ERASE 2,2
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.  
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.      ERASE                      VPI1  VPI  VPIN                       ERASE
  6152.      VP-Info Level 1 Reference Manual           Page 218          SECTION 4
  6153.  
  6154.  
  6155.  
  6156.                                      FIELD
  6157.  
  6158.      Initiates a program segment module in an ON FIELD structure
  6159.  
  6160.      ╔════════════════════════════════════════════════════════════════════╗
  6161.      ║ FIELD <fieldname>/<fieldnum>                                       ║
  6162.      ║                                                                    ║
  6163.      ║ fieldname       name of a field in a Get Table                     ║
  6164.      ║ fieldnum        number of a field in a Get Table                   ║
  6165.      ╚════════════════════════════════════════════════════════════════════╝
  6166.  
  6167.           Each field in a Get Table may have a program segment in a
  6168.      program's ON FIELD structure which will be executed when the cursor
  6169.      leaves that field, or optionally when READ or the current record is
  6170.      exited.
  6171.  
  6172.           All fields in a Get Table are numbered from 1 to 64 in the order
  6173.      in which they are placed on the screen.  When they are painted by
  6174.      @ GET commands, the order is the same as the order of the @ GET
  6175.      commands in the program; if painted by TEXT, the order is left-to-
  6176.      right on each line, and then top-to-bottom.
  6177.  
  6178.           When editing with the internal VP-Info Level 1 programming editor
  6179.      (see WRITE command), Alt-F reformats the file with all structures
  6180.      properly indented, making it easy to see unbalanced structures.
  6181.  
  6182.           (See command ON FIELD.)
  6183.  
  6184.           Examples:
  6185.  
  6186.      FIELD 3
  6187.      FIELD cust
  6188.      FIELD name#3
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.      FIELD                      VPI1  VPI  VPIN                       FIELD      VP-Info Level 1 Reference Manual           Page 219          SECTION 4
  6210.  
  6211.  
  6212.  
  6213.                                     FIELDS=
  6214.  
  6215.      Set the maximum number of fields available at any one time.
  6216.  
  6217.      ╔════════════════════════════════════════════════════════════════════╗
  6218.      ║ FIELDS= <num>                                                      ║
  6219.      ║                                                                    ║
  6220.      ║          VP-Info Professional only             VPI.SET file only   ║
  6221.      ║                                                                    ║
  6222.      ║ <num const>  maximum number of fields allowed in all data files    ║
  6223.      ║                open at any one time (including VP-Info Level 1's   ║
  6224.      ║                internal work file); range 128 to 1000              ║
  6225.      ╚════════════════════════════════════════════════════════════════════╝
  6226.  
  6227.           This command sets the maximum number of fields that can be open
  6228.      at any one time in all open files,  taking the place of SET FIELDS TO
  6229.      in earlier versions of the language (now ignored if encountered by the
  6230.      VPI-Info compiler).
  6231.  
  6232.           Reserving memory space for a single field requires 16 bytes.
  6233.      Therefore, increasing the number of fields requested reduces the
  6234.      memory space available for your program.
  6235.  
  6236.           The limits for FIELDS= are 128 and 1000, with a default of 320.
  6237.  
  6238.                Caution: be sure you have SET FIELDS to a number large
  6239.           enough to accommodate all the fields in all the data files you
  6240.           will ever have open at one time, plus the largest number of
  6241.           fields in any of these files.
  6242.  
  6243.           Example:
  6244.  
  6245.      FIELDS=500
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.      FIELDS=                        VPI  VPIN                       FIELDS=      VP-Info Level 1 Reference Manual           Page 220          SECTION 4
  6267.  
  6268.  
  6269.  
  6270.                                      FILES
  6271.  
  6272.      Lets you specify drive letters, directories, and/or default file modes
  6273.      for various files used by VP-Info Level 1.
  6274.  
  6275.      ╔════════════════════════════════════════════════════════════════════╗
  6276.      ║ FILES                                                              ║
  6277.      ║ FILES <specification> [,[<file direction>] [,<mode>]]              ║
  6278.      ║                                                                    ║
  6279.      ║ specification    any file name or "skeleton" (using the * and ?    ║
  6280.      ║                    wildcards                                       ║
  6281.      ╟────────────────────────────────────────────────────────────────────╢
  6282.      ║ Options:                                                           ║
  6283.      ║                                                                    ║
  6284.      ║ file direction   any legal DOS path, consisting of drive letter    ║
  6285.      ║                    and colon and/or directory path                 ║
  6286.      ╟────────────────────────────────────────────────────────────────────╢
  6287.      ║ Option: (VP-Info Professional Network Edition only):               ║
  6288.      ║                                                                    ║
  6289.      ║ mode             any one of the optional file-opening modes used   ║
  6290.      ║                    in network operation -- LOCK or L, WRITE or W,  ║
  6291.      ║                    READ or R, or SHARE or S. If no mode is set,    ║
  6292.      ║                    or if Network Edition is not in use, the        ║
  6293.      ║                    default mode is LOCK                            ║
  6294.      ╚════════════════════════════════════════════════════════════════════╝
  6295.  
  6296.           There is always a FILES Table in memory, set up by the active
  6297.      FILES ... ENDFILES structure.  (This table is empty if there is no
  6298.      active FILES ... ENDFILES structure.)  The FILES command allows
  6299.      on-the-fly additions and changes to the FILES Table from either
  6300.      Conversational VP-Info Level 1 or programs.
  6301.  
  6302.           Examples of Form 1 (Only in programs):
  6303.  
  6304.      FILES
  6305.  
  6306.      Initiates a FILES ... ENDFILES structure.  (See FILES ... ENDFILES.)
  6307.  
  6308.  
  6309.           (Only in Conversational VP-Info Level 1)
  6310.  
  6311.      1>FILES
  6312.  
  6313.      Empties the current FILES Table in memory.  (Caution: Do not confuse
  6314.      this interactive command with the FILES command as used in programs,
  6315.      which always initiates a FILES ... ENDFILES structure.)
  6316.  
  6317.           Examples of Form 2 (In either programs or Conversational
  6318.      VP-Info Level 1):
  6319.  
  6320.      FILES *.dbf,c:\data
  6321.  
  6322.  
  6323.      FILES                      VPI1  VPI  VPIN                       FILES      VP-Info Level 1 Reference Manual           Page 221          SECTION 4
  6324.  
  6325.  
  6326.      Given this command, either in a  program or in Conversational
  6327.      VP-Info Level 1, VP-Info Level 1 searches the FILES Table in memory
  6328.      for a matching file specification.  If the file specification *.DBF is
  6329.      found, the new path will replace the existing path; otherwise, this
  6330.      specification and redirection is added to the top of the FILES Table.
  6331.  
  6332.      FILES *.frm
  6333.  
  6334.      If no <file direction> is specified, file redirection is turned off
  6335.      for files matching this entry.
  6336.  
  6337.           Macros are allowed with the FILES command itself, either in
  6338.      programs or in Conversational VP-Info Level 1, although macros are not
  6339.      permitted in the FILES ... ENDFILES structure.
  6340.  
  6341.  
  6342.                  For VP-Info Professional Network Edition only
  6343.  
  6344.           There is a special form of the FILES command which has
  6345.      significance only in VP-Info Professional Network Edition with SET
  6346.      NETWORK ON.
  6347.  
  6348.           This form adds a <mode> which sets the default file mode for all
  6349.      matching files.  For example,
  6350.  
  6351.      FILES *.ndx,ndx,READ
  6352.  
  6353.      sets a file mode of READ for all files with an NDX extension, all of
  6354.      which are found in the NDX subdirectory of the current directory.
  6355.  
  6356.           If only <specification> and <mode> are given, the file mode is
  6357.      given to all files matching that specification wherever they are on
  6358.      the disk. (Note: two commas are required:  FILES *.dbf,,WRITE.)
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379.       FILES                      VPI1  VPI  VPIN                       FILES      VP-Info Level 1 Reference Manual           Page 222          SECTION 4
  6380.  
  6381.  
  6382.  
  6383.                                FILES ... ENDFILES
  6384.  
  6385.      Lets you specify drive letters, directories, and/or default file modes
  6386.      for various files used by VP-Info Level 1.
  6387.  
  6388.      ╔════════════════════════════════════════════════════════════════════╗
  6389.      ║ FILES                                                              ║
  6390.      ║ <specification> [,[<file direction>] [,<mode>]]                    ║
  6391.      ║ ENDFILES                                                           ║
  6392.      ║                                                                    ║
  6393.      ║ specification    any file name or "skeleton" (using the * and ?    ║
  6394.      ║                    wildcards); must not be indented                ║
  6395.      ╟────────────────────────────────────────────────────────────────────╢
  6396.      ║ Options:                                                           ║
  6397.      ║                                                                    ║
  6398.      ║ file direction   any legal DOS path, consisting of drive letter    ║
  6399.      ║                    and colon and/or directory path                 ║
  6400.      ╟────────────────────────────────────────────────────────────────────╢
  6401.      ║ Option: (VP-Info Professional Network Edition only):               ║
  6402.      ║                                                                    ║
  6403.      ║ mode             any one of the optional file-opening modes used   ║
  6404.      ║                    in network operation -- LOCK or L, WRITE or W,  ║
  6405.      ║                    READ or R, or SHARE or S. If no mode is set,    ║
  6406.      ║                    or if Network Edition is not in use, the        ║
  6407.      ║                    default mode is LOCK                            ║
  6408.      ╚════════════════════════════════════════════════════════════════════╝
  6409.  
  6410.           (Programs and CNF file only)  There is always a FILES Table in
  6411.      memory, set up by the active FILES ... ENDFILES structure.  (This
  6412.      table is empty if there is no active FILES ... ENDFILES structure.)
  6413.  
  6414.           A FILES ... ENDFILES structure may be created in a program at any
  6415.      time, and may have any number of specification lines between the FILES
  6416.      and ENDFILES lines.  All existing entries are immediately cleared and
  6417.      a new FILES Table constructed.
  6418.  
  6419.           Examples:
  6420.  
  6421.      *.dbf,c:\data
  6422.  
  6423.      Causes VP-Info Level 1 to add C:\DATA\ to the front of all file names
  6424.      Given this command, either in a VP-Info Level 1 program or in
  6425.      Conversational VP-Info Level 1, VP-Info Level 1 searches the FILES
  6426.      Table in memory for a matching file specification.  If the file
  6427.      specification *.DBF is found, the new path will replace the existing
  6428.      path; otherwise, this specification and redirection is added to the
  6429.      top of the FILES Table.
  6430.  
  6431.      FILES *.frm
  6432.  
  6433.      If no <file direction> is specified, file redirection is turned off
  6434.      for files matching this entry.
  6435.  
  6436.      FILES ... ENDFILES         VPI1  VPI  VPIN          FILES ... ENDFILES      VP-Info Level 1 Reference Manual           Page 223          SECTION 4
  6437.  
  6438.  
  6439.  
  6440.           A FILES ... ENDFILES structure is cleared by an empty structure
  6441.      as follows:
  6442.  
  6443.      FILES
  6444.      ENDFILES
  6445.  
  6446.           No macros are permitted in the FILES ... ENDFILES structure,
  6447.      although macros are allowed with the FILES command itself, either in
  6448.      programs or in Conversational VP-Info Level 1.
  6449.  
  6450.                Caution: There is no way to add a comment inside a FILES ...
  6451.           ENDFILES structure, and no line should be indented.  The contents
  6452.           of FILES ... ENDFILES structures are not affected by the
  6453.           reformatting facility Alt-F of the WRITE command.
  6454.  
  6455.  
  6456.                  For VP-Info Professional Network Edition only
  6457.  
  6458.           There is a special form of FILES ... ENDFILES entry which has
  6459.      significance only in VP-Info Professional Network Edition with SET
  6460.      NETWORK ON.
  6461.  
  6462.           This form adds a <mode> which sets the default file mode for all
  6463.      matching files.  For example,
  6464.  
  6465.      *.ndx,ndx,READ
  6466.  
  6467.      sets a file mode of READ for all files with an NDX extension, all of
  6468.      which are found in the NDX subdirectory of the current directory.
  6469.  
  6470.           If only <specification> and <mode> are given, the file mode is
  6471.      given to all files matching that specification wherever they are on
  6472.      the disk. (Note: two commas are required: *.dbf,,WRITE.)
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.      FILES ... ENDFILES         VPI1  VPI  VPIN          FILES ... ENDFILES      VP-Info Level 1 Reference Manual           Page 224          SECTION 4
  6494.  
  6495.  
  6496.  
  6497.                                      FILES=
  6498.  
  6499.      Set the maximum number of files which can be open at one time
  6500.      (requires DOS 3.3 and above and VP-Info Professional)
  6501.  
  6502.      ╔════════════════════════════════════════════════════════════════════╗
  6503.      ║ FILES= <num const>                                                 ║
  6504.      ║                                                                    ║
  6505.      ║          VP-Info Professional only             VPI.SET file only   ║
  6506.      ║                                                                    ║
  6507.      ║ <num const>   maximum number of files that can be open at any one  ║
  6508.      ║                 time; range 21 to 65                               ║
  6509.      ╚════════════════════════════════════════════════════════════════════╝
  6510.  
  6511.           VP-Info Professional is not limited to the 20-file maximum of
  6512.      Level 1 and earlier versions of VP-Info, provided the operating system
  6513.      allows more than 20 open files (DOS 3.3 and above) and that a FILES=
  6514.      statement is present in the CONFIG.SYS file specifying at least <n>
  6515.      files.
  6516.  
  6517.           As a practical matter, <n> should be in the range 25 to 60; the
  6518.      default and minimum is 20. Loading more files reduces the maximum size
  6519.      of programs and reduces speed of such memory-intensive commands as
  6520.      INDEX.
  6521.  
  6522.           This command may be placed only in the VPI.SET file, which is
  6523.      executed by VP-Info Professional only when first loaded. See VPI.SET
  6524.      in the Required Files chapter.
  6525.  
  6526.           Example:
  6527.  
  6528.      1>FILES=50
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.  
  6550.      FILES=                         VPI  VPIN                        FILES=      VP-Info Level 1 Reference Manual           Page 225          SECTION 4
  6551.  
  6552.  
  6553.  
  6554.                                    FILES LIST
  6555.  
  6556.      Display the current contents of the FILES ... ENDFILES structure
  6557.  
  6558.      ╔════════════════════════════════════════════════════════════════════╗
  6559.      ║ FILES LIST                                                         ║
  6560.      ╚════════════════════════════════════════════════════════════════════╝
  6561.  
  6562.           The current FILES ... ENDFILES structure may be displayed with
  6563.      this command.  See FILES and FILES ... ENDFILES.
  6564.  
  6565.           Example:
  6566.  
  6567.      1>FILES LIST
  6568.      File Spec       Drive and/or Path
  6569.      *.CPL           CPL2\
  6570.      *.NDX           NDX2\
  6571.      *.DBF           DBF\
  6572.      *.DBK           DBK\
  6573.  
  6574.  
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.      FILES LIST                 VPI1  VPI  VPIN                  FILES LIST
  6608.